My first thought is that the question, on its face, is something of a misstatement. I would say that right and good are self-referential (they are not necessarily synonymous, but they are closely related). I would say that the right thing to do is a good act, and good acts are the right thing to do - they are terms which inform and define one another; as I said, very close to synonymous.
A much more interesting question, however, and I think that this is what supergoober may have intended with his question is "good vs. necessary". Of course, implicit in this question is the concept of the "necessary evil", an idea that I have used in previous arguments/justifications for certain things, but one which, of late, I have come to feel is quite weak and can be used as a justification for almost anything. As a result, I do not believe that the idea of "necessary evil" is a tenable position to defend.
However, there are many necessary acts that are morally neutral, and, in fact, some acts that are "evil" are less evil or even morally neutral given context. In fact, much of morality is not about the actual act, but about the context of the ramifications and of the intent behind the act.
For example, many religions view sex outside of marriage as wrong. In fact, there is a lot, generally, of interest in sexual ethics. The actual sexual act is not the moral concern (even at the heart of the Catholic religious teaching - I am Catholic, by the way - the essence of the teaching is not actually about the sex act), rather the impact it has on the people involved. Sex can be morally good, morally neutral, or morally evil (in my opinion). When it serves to enhance the relationship between two loving individuals, when it deepens the relationship, when it is mutually expressive of love and it brings those two people closer in their relationship, then it is a moral good. When it is simply two consenting individuals meeting for mutual physical gratification of a need or perceived need, it is morally neutral (though I would argue that this situation is extremely rare - people do not come in to sexual encounters with equal power, with well-identified and conveyed intentions, etc.). When it sex is solely for one of the partner's personal gratification with no care to the other person, or when it is done to establish control or power over another, or when it is done to demean another is when it is morally evil.
(Side note - this is not to say that a committed, loving couple cannot engage in behavior that would appear demeaning to others when viewed out of context; rather, if the behavior serves to strengthen the loving relationship, it is appropriate and good)
If an act becomes necessary (for example, if the act is compelled) - it ceases to have moral implications, in effect becoming morally neutral. For example, if I were to tell you that if you don't steal a loaf of bread, I will kill your wife, you would have little option but to steal the bread (a lesser evil than the taking of a life) or somehow stop me by restraining, injuring, or even killing me (again, done in the service of preserving a life).
You may have noted that I remarked that one thing was "less evil" than another. While I do believe that there is an absolute morality (that is, there are things that are unequivocally right or wrong), but that does not preclude gradations. It is entirely possible for things to be more or less right or wrong under this structure. Most people erroneously believe that belief in an absolute morality precludes gradation; it does not. Stating that there is a right answer does not mean that there aren't lesser right answers, better wrong answers, and completely wrong answers.
In a non-moral sense that allows for visualization of this, consider the equation
x2 = 9. The correct answer to this equation is positive or negative 3. A slightly less correct answer would be positive and negative 3 (a subtle set distinction in math). Answering 3 is partially correct, answering 4.5 is kind of wrong (dividing instead of taking the square root, but still applying algebra), answering 0 is patently wrong (just a guess, but still in the realm of mathematics), answering "tomato" is about as wrong as you can get.
Just because there is a right answer does not preclude gradation (the essence of partial credit in a classroom).
As far as I am concerned, morality is essentially based on the impact on the lives, feelings, and spirits of people (basically how it impacts people emotionally, intellectually, and physically). I have not fully thought this out yet, but the worse impact you have on a person (or persons, including yourself) the more evil it is. Obviously, this culminates with taking a life or lives (though I am sure I could potentially conceive of a way to come up with something more evil without taking a life). Some people would argue that I am missing out when I do not specifically address the world, or the environment, etc., but I would argue that there is a moral obligation to uphold the environment to be able to allow other people the positive experience of beauty, as well as to be able to live in a healthy, life-affirming, and positive way.
Again, this seems to be somewhat relativistic in that I base it on the impact on human beings; however, I believe that there is an absolute positive or negative impact on people whether they realize it or not. Take, for example, a person who routinely engages in meaningless sex with strangers for physical gratification. I would argue that this person may be satisfying a physical need, but may be damaging themselves and their partners emotionally. If the acts serve only to make them more base and less "fully human" (that is fully expressed as an intellectual, physical, emotional, and spiritual being) then they are doing something evil - both to the other people involved and to themself. There is a moral obligation to any human being, including yourself.
More forthcoming later...