Usually yes for cars, with more caveats for two-wheelers, and the caveats are where tourists get hurt financially and physically. For cars, rental companies in most countries accept a foreign license, adding an IDP requirement where local law or company policy demands one, so carry both to be safe.
Two-wheelers are the trap zone: a car license usually does not cover motorcycles, and in many countries not even small scooters, and riding unlicensed is exactly when insurers refuse to pay after a crash.
Whatever you rent, the ritual is the same: photograph the vehicle thoroughly at pickup, confirm what insurance is actually included versus sold as extra, check helmet quality on scooters, and never leave your passport as a deposit, since a card hold is the legitimate mechanism and passport-holding shops create ugly leverage in damage disputes.