There is a colleague at my (American) workplace who is young and smart, but fairly inept at using his filter function while he's talking.
At a group meeting (his manager was present), he went on about a scene in a porn movie. I was the least senior and newest person in the room and didn't feel comfortable telling him that he was walking a dangerous road. Personally, I wasn't offended and there are no women on our team (and I suppose nobody else was offended either), but I can see how this behavior is harassment if someone felt uncomfortable.
Another time, he told me my shirt "popped". I said thanks and then he proceeded to do a stereotyped impression of an effeminate man talking about colors "popping". I am a gay man, out at work (he knows), but I again wasn't personally offended because I know he's an awkward guy who probably didn't even put the fact that I'm gay and that his impression makes fun of gay people together. He likes to make people laugh, his jokes just aren't that funny. I felt I had a duty to tell him that his behavior is cringe-inducing at best, and hostile at worst. But alas, the moment passed and I didn't say anything. He sees me as a friend and I don't really want to go behind his back to his manager since it would be obvious from the exchange about effeminate stereotypes that it was me.
Is it my obligation to inform him or his manager of this kind of behavior? Confrontation is difficult (for everyone, I assume) and I don't feel I owe him the time to explain what's wrong so the pros/cons of getting involved seem lopsided toward "ignore his behavior". I am a temporary contractor and he's a permanent employee so I don't feel like the culture is necessarily mine to improve.
Small addition: I'm not interested exclusively in my legal obligation, but also the moral obligation. "Should I, as a good person, do something?" rather than "Must I, as an employee of this company, do something?"