If the offensive content is out of context, then it's wrong. If it's in the context of the story, then I don't see a problem with it being included.
Having said that, you need to be aware of your target audience. If it's a group of no-holds-barred readers, then you won't have a problem. If it's for a group of romantics who want a luvvy-duvvy story, then you need to be oblique in your references.
You don't write horror stories for a romance audience, and you don't write romance for a horror audience. If you want to write for a particular audience, then you have to write appropriately for that audience, because it's writing in-appropriately that makes something offensive. If you don't care who your audience is, such as if you are really just writing for yourself, then don't worry about it -- just write and don't be concerned if someone may find the content offensive.