It is allowed to overtake trams. In places where it is convenient to overtake on the right side, you can do so. Generally, overtaking trams happens on the left side, similar to other overtaking maneuvers.