I'm pretty sure OP is referring to a bunch of other comments here that were saying those exact things - that to avoid such a situations from arising in the first place, refrain from doing anything non-work related with coworkers.
Which is all hilarious to me because I'm friends with a lot of my coworkers, drink with them, and even have had the audacity to casually (and mutually) flirt with a couple of them. Based on what I've been reading in these comments, my career ought to be crumbling down by now.
I think some commenters are focusing too much on the non-professional aspect and not enough on the power-imbalance aspect presented in some of these cases.