I don't think talking about sex with someone you consider to be a friend is, in itself, rude or inappropriate.
Some honest discussions with female friends might actually be quite helpful and healthy! Surely women should be able to help each other with genuine concerns - whether relating to sex, childcare, distribution of household chores, problems with in-laws or whatever?
If a friend has a genuine worry or problem with sex, I think it's probably best to listen and then either offer your thoughts or advice if possible or else say something along the lines of "I'm sorry you're having a problem like that. I don't think I can offer any advice and I actually feel a bit uncomfortable talking about such personal things, but I think there are places where you can get some expert advice. I'll help you find out what's available."
If someone is just trying to shock or get a reaction that's different; but you can probably curtail the chat by ignoring the comments, changing the subject, or simply telling them the particular topic is not something you want to talk about.
Maybe some honest chat among women can help dispel the myths and sexist attitudes about sex displayed in many films and TV shows.