(Teachings from Gita) Arjun thought that if he fought against his own brothers, the Kaurvas, in the war then he would be doing wrong. So he didn't want to participate in the war. We consider that who we are in our next birth is determined by our deeds in this birth. Thus, we are tied to our deeds and virtues and this is the motivation for good men to do good deeds and lead a virtuous life. However, Krishna says that if a deed is done with the intention of doing good for others and doesn't have any selfish motive attached to it then such deeds do not tie you; they do not contribute to your sins because they're selfless deeds; such are the deeds that we should do. He also says that we can't shrink from our duties in this way.
The lesson that I take away from this is that sometimes we might consider certain things to be wrong but we should think if it does good for other people, is it good for the world, am I doing this solely for other's benefit and there's nothing in it for me. If the answer is yes, then we should do it. Simply put, it's not considered wrong then.
I'm unable to think of an example for this case, I think the one in question - Arjun's dilemma is the best. However, I can think of a counter-example. One can't kill a murderer/thief saying that the world would be a better place if I did that. For one that is not your duty, there is law to decide that. Your duty would be to bring him before the legal system. It may sound as a random example to some, but when I was thinking about the essence of what Krishna said the first thing that came to mind was this: would it be correct to eliminate anti-social elements from this world in the light of what has been said?
I've lots of questions brewing in my mind but I think the next few shlokas would answer them so I'll wait till I read them. In the meantime, if anybody wants to elucidate on this please do.