I always liked this saying:
"Wrong is wrong even if everyone is doing it Right is right even if no one is doing it"
If you are talking strictly about ethics then yes breaking the law may be the right thing. Maybe the law is wrong. And even more importantly - even if something is within in the law does not make it ethically right. It just means you will not be doing something illegal.
A better way though may be to work to change the law if at all possible - it would depend on the situation - if it does not need immediate attention where it is harmful or harmful to particular individuals - then yes try to change the law and do it lawfully as well as ethically.
Now on the flip side - ethics can vary depending on people's values - however, there are certain things that I would think the majority can agree on - so this is what can cause one person to think they were "right" in breaking the law, whereas someone else could think they are "wrong."
And for the first item - think Rosa Parks. She broke the law and look where she stands now in our history books - and I am sure we can find many examples. The one thing though in this regard - if you need to break the law for the better good - do not break other ethics in order to do so. So In this example Rosa did not go over and physically hurt someone to get her seat.