Travelling to other countries in a rented vehicle without prior consent from the rental company is not allowed. Check what the rules are for crossing borders in a rental vehicle with the rental company beforehand.