There are a few different cases of "don't do X lest you do Y." Let me try to state a few off the top of my head, and hopefully that can get you started. This is a pretty technical and advanced question; I wish I could do a better job explaining it, but I apologize as I'll probably lose some readers here.
A.) "Don't do action X because others will assume that what you're doing is instead action Y." E.g. don't eat beef mixed with almond milk (action X), as OTHER people will think you're eating beef mixed with "real" milk (action Y). The mistake here is that almond milk isn't dairy milk. You yourself will never make the mistake, but others might. This is known as "maris ayin."
There is a leniency about this: The Pischei Teshuva, Yorah Deah 87:10, says that according to some opinions, if action Y is only prohibited rabbinically anyhow, and you're doing X in the privacy of your home with no onlookers, it's permissible. In the above case, for instance, you could eat chicken mixed with almond milk IN THE PRIVACY OF YOUR OWN HOME. (According to this opinion.)
B.) "If you do action X, everyone knows that action X is not action Y; but you or others might not discern a Halachic distinction between X and Y, and therefore will assume that Y is also permissible."
A terrific example is Rambam, Maachalos Asuros 9:4. If the rabbis allowed chicken mixed with milk (action X), everyone knows that chicken is not beef, but people would see no Halachic distinction between them, and therefore think it's okay to eat beef with milk (action Y). The Rambam's language is "so the people don't rationalize."כדי שלא יפשטו העם
ויבואו לידי איסור
Another good one is Mishnah Ediyot 5:2. Note the concern is about the SAME INDIVIDUAL who does action X may do action Y.
As rationalization is a dangerous thing, these cases tend to be "no ifs, ands, or buts." Note that chicken-and-milk has less leniencies than other rabbinic prohibitions vis-a-vis meat-and-milk. (Need citation here.)
C.) "If you do action X, you may forget yourself and perform action Y." The usual language here is "lest one come to ..." or "because of the routine leading to a sin ..." גזירה משום הרגל עבירה. Don't have meat and milk on the same table, as you may forget what you're doing and eat both. (Rambam Ma'achalos Asuros 9:21). But there are more ways around this, e.g. if it's two strangers at the table eating off different placemats.
A similar case is "if you do action X, you might lose self-control and knowingly do action Y." E.g. a single Jewish guy and gal shouldn't share a hotel room.