This is a very complex question. And so far I dont see many people that have answered this having put any thought into it.
You say that you dont mean breaking the law. But the law is often morally wrong, like for instance labelling middle eastern people as potential terrorist. The propaganda in the media is so much these days that we dont need to worry about planes being hijacked so much as our minds being hijacked relentlessly with pro-war idealisms.
To answer your question as simply as possible, I think morally wrong and right is hard to define these days. It may be morally right to inform the law that there is a vagrant in your neighbourhood according to society. But according to your conscience it may be morally wrong to dob that person in if he is just harmlessly trying to get by in life and just is going through a very bad moment and wants to be left alone.
So is it better to do something that is morally right for the wrong reasons? Or something morally wrong for the right reasons? What you need to analyse is wrong and right to whom? To you? To the law? To society? To a family member? A best friends?
There will always be winners and losers in this game of life. But what you need to remember is your intent. If for instance you knew of a friend harboring innocent Jew fugitives back in Nazi Germany circa 1940s. Then it would be morally wrong to notify the government. But lawfully right. If you informed the government because you are blindly following the law, and you believe the government is infallible, then you did wrong but for the right reasons.
However if you knew the government is doing wrong and you did it to say further your career, then you did a right thing for the wrong reasons. But life is always filled with these ironies, so ultimately it comes down to your basic idealogies, and if you sell out to a higher authority out of fear, which itself may be corrupted already. Always go with your core beliefs, and not what others say, be it peer/social pressure, family pressure, or the law. As none of these are fullproof compasses on morality.