Slavery is a perfect example of this very thing you speak.<quoted text>
You have failed to grasp the fundamental flaw in your reasoning...
If society decides that rape is okay, you have to go along with that.
According to your argument.
But as you subject the morality of the individual to society, you are in effect forcing the individual to go against their conscience.
What if the individual is more enlightened than society, should he practice societies morality because he is outnumbered?
It was once perfectly acceptable, but the minds shifted that it wasn't. So it became immoral, mind you this shift took hundreds of years to complete. There is no flaw here we can see examples in history, as society's changed so did morality.
Is it moral to burn witches at the stake?
It once was, and they did by moral minded Christians, who believed themselves right. But this unthinkable now, and more than a few steps away from what thought to be moral.