The Gemara interprets the machlokes between Rebbi and his father R. Shimon Ben Gamliel to be whether one should violate a lower level sin, to prevent someone else from the violation of a more severe sin. The exact circumstance that the gemara talks about is whether a talmid chochom should violate the prohibition of separating Teruma and Ma'aser שלא מן המוקף (Rashi Gittin 30b implies it's only d'rabonon. Tosafos holds that for Teruma it is d'oraysa, but it is considered a lower level violation presumably because it doesn't prevent the Teruma from going into effect), or whether he should not separate which would cause the am ha'aretz to end up eating tevel. R. Shimon Ben Gamliel holds that a person must worry about himself, and not sin to protect others from a more severe violation. Rebbi holds that one should violate the less severe prohibition to prevent the am ha'aretz from eating tevel which is more severe. The Rambam (Ma'asros 10:10) paskens like Rebbi.
Tosafos raises an interesting question. The gemara says in Shabbos 4a that one should not commit a "minor" sin in order to prevent someone else from violation a "major" sin. The example given is that one should not remove bread from the wall of an oven violating the Rabbinic prohibition against רדיית הפת, to prevent the person who put the bread in the oven from violating the melacha of baking on shabbos. How then does Rebbi permit the violation of שלא מן המוקף to prevent the am ha'aretz from eating tevel? Tosafos answers that in Rebbi's case, the talmid chochom who permitted the am ha'aretz to take from his fruits was somewhat negligent in causing the am ha'aretz to violate this prohibition. When one is the cause of someone else's violation, they are better off violating a minor violation to prevent someone else from violating a more major violation. Tosafos continues to prove that in a case where the person who would be violating the more major violation was a complete o'nes and not negligent at all, then one should violate a minor prohibition to prevent that person from violating a more serious violation.
In short, the concept of not allowing one to sin to save someone else, only applies when the person who would be violating the more minor violation is in no way responsible for causing the other to violate the major violation AND the one violating the major violation is someone negligent as well. However, if either the one who would be violating the minor violation caused the other to violate the more serious violation (even though he himself was also negligent), OR the one violating the more major violation did nothing wrong and is a complete o'nes, in both those cases we say חטא בשביל שיזכה חבירך - sin to save your friend.
The Maharatz Chiyus asks a question from the opinion of the Aguda who is brought in the Taz Y.D. 334 who proves from a gemara in kiddushin 72a that Beis Din is required to put someone in cheirem even if it will cause him to go off the derech and completely reject Judaism. Why don't we say that beis din should ignore, violating a more minor prohibition, to save that person from complete rejection of Judaism which is obviously a more serious violation? It seems to me that the answer is simple. When it comes to a situation where one should be put in cheirem, ignoring it is not considered a minor violation. The Beis Din has the responsibility to prevent this individual from influencing others. By ignoring his actions they may be causing more harm to others who will learn from his actions than they would be causing to him by putting him in cheirem. Therefore, this case doesn't qualify as doing something minor to prevent someone else from violating something major.