i can tell you right now, there is no law pertaining to this. If it is, it is not enforced at all because I pass cop cars stuck in traffic on the right weekly. I cycle every day to work in downtown toronto and if I along with every other cyclist in Toronto were to wait in traffic lines, we would never get anywhere.
When you are in the city literally every single cyclist has to do this out of necessity due to gridlock.
The best bet is to just use roads with bike lanes, however its not always 100% an option.
I do have to laugh at the cyclist related sentiment, I as a driver and cyclist would like to point out the general stupidity of the majority of drivers far exceeds that of cyclists on average. I personally know along with most other cyclists that we have wayyyy more at stake in a collision with a motor vehicle. For a car driver a collision with a cyclist is a nuisance, for me its a matter of life or death.
I cannot tell you the amount of times ive nearly been hit by drivers making completely idiotic maneuvers such as turning right at an intersection from the left lane on a two lane road, or more commonly, clearly seeing me riding down a road, however feeling that because I am a cyclist it is the right of the motor vehicle operator to pull out from a side street directly infront of me even though you make eye contact with me and acknowledged that I am visible.
Hate all you want, but if you expect me to contribute to the environment by sitting in gridlock for an hour a day, vs passing some stopped cars on the right come at me bro lol