There are no specific codes or regulations that dictate which side of the toilet a toilet paper holder should be installed on. The choice is left open and depends more on personal comfort and layout of the particular bathroom. Also, different designs allow options outside of the holder being installed on a wall.
The walls to the left and right sides of a toilet, by code, must each be at least 15 inches away from the centerline of the toilet. This is just the minimum distance, and toilets are often installed with more distance from the centerline to the side walls, allowing adequate space for the shoulders and elbows of toilet users. Unless the bathroom space is extremely small, or the toilet is inside a stall, more open space from the toilet to the wall will exist on one side of the toilet than on the other. Simply install the holder on the closer wall.
Paper Holder Placement
If the toilet paper holder is placed on the wall behind the toilet, an individual seated on the toilet needs to turn and reach for the paper. This can cause discomfort, especially over time, having to turn again and again. For this reason, consider placing the holder on the wall at a distance of 8 to 12 inches from the front of the toilet. A convenient height is about 26 inches above the bathroom floor.
Toilet Height Concerns
Also, consider the height of the toilet and the height of the main users. If the toilet is for a child, positioning the paper holder at a lower height on the wall may be more practical. If the height of the toilet is higher than average, or the users taller than average, install the holder a little higher on the wall.
One option with a toilet paper holder, allowing you to switch it from one side to the other, is a freestanding holder. These holders often have weighted bases to protect them from being tipped over accidentally, but they are otherwise able to be moved freely from one side of the toilet to the other. If space is already a concern in a small bathroom, installing an over-the-toilet shelf and placing the toilet paper on top can be a viable solution.