@Adrien
Depending on which city you are visiting, generally speaking you can use international driving license (if you have one).
The problem however lies on the human aspect.
- Local police doesn't really know about this rule
- They don't speak english that well.
- They can be bribebribed...
I know many foreigners riding scooter without proper license in Bali, Lombok or some other small cities, where these rules can be more lenient toward tourists. You can find loads of places where you can rent a scooter for as cheap as $10/day (excl. fuel). Most of them only requires you to hand over a copy of your passport or some refundable deposit.
But if you are planning to explore big cities such as Jakarta, Surabaya, Semarang it is much better if you just rent a car.