I have a type B European drivers licence with which I'm allowed to drive a car in my home country (i.e. not a motorcycle). Am I allowed to buy/rent a motorcycle in Bolivia and drive it? If not, should I get a motor licence here, or is it also possible to get one (as a tourist) in Bolivia?
You get an international driving permit from your home country:
No problem at all to rent motorcycles and cars with that if you have the requirement in your original driving license. While the convention says that you should have your original driving license available I never have done that (could be lost) and I have been never asked for that.
So strictly speaking legally no, it is not possible to drive a motorcycle with only an automobile license. If it is tolerated (some countries do not enforce street traffic very strictly) I do not know, perhaps someone from Bolivia or traveling to it could answer that.
As I have a motorcycle license myself I am sorry to say that, but driving a motorcycle in a third-world country if you have no road experience is asking to get killed. You need to drive carefully even here because you have to get the "sense" how people react because you have no protection (the leather gear and helmet protects against falling down (sometimes deliberately to save your life)) against collisions and stupid drivers.
You need to check to see if your international license permits you to drive a motorcycle. Bolivia, like most other countries, expects you to have a special license to ride a motorcycle.
Here in Bolivia there are check points checking to see if you have the correct paperwork. Being a foreigner they will probably give you more trouble than if you were a native.
To get a Bolivian drivers' license you need to be a resident.
You need a local medical checkup and you have to go to drivers school. You will also need several certificates from several different police stations.
Here is a link for reference: http://www.segip.gob.bo/web/index.php/requisitos-para-obtener-la-licencia-para-conducir