The other day I was on a small-ish two lane road where traffic in the other lane was traveling in the other direction. I came upon an unattended stopped car with it's emergency blinkers on blocking my current lane. Since I could clearly see no traffic was coming in the other lane I moved around the stopped car, briefly crossing the solid yellow line so I was partially in the wrong lane, before returning back into my own lane and continuing on my way. I was neither the first nor the last car on this road to do so.
I feel little regret for temporarily ignoring the solid line to pass the stopped vehicle, in fact I'm pretty sure I could have done it with a police officer right behind me without worry that I would get a ticket. Still I did violate the rules by traveling in the wrong lane. I was wondering rather this sort of 'common sense' violation of traffic laws to adjust for extenuating circumstances was technically illegal.
I know in an emergency situation I'm allowed to violate the usual rules if necessary to avoid a crash, for example to quickly swerve into the wrong lane to avoid a collision if someone cuts me off and there is no other way to not strike them. However this wasn't an emergency situation. I would likely have been stuck behind this vehicle for an extensive length of time if I had waited and abide by the usual driving laws, but no ones life was in danger. Was I still authorized to adjust the usual rules to move around the obstacle?