I was never allowed to talk about our SSM, when I did once to a friend and my W found out, she flew into a fit of rage and threatened divorce, saying her privacy had been breached.
I agree with both camps here. When you're young you can't possibly imagine having sexual issues with your beautiful spouse; so when it does happen you don't know where to turn. You don't want to confess failure in the most intimate yet elementary part of the relationship. Yet, incredibly, it's an extremely common outcome!
That's exactly how I felt in the first few months after our honeymoon. It was before the days of google and the internet; now you can find out that most marriages are sex-starved, but back then you would feel so alone. You're starving for affection, you go out on the street and see happy couples of all ages and you imagine that you are the only one suffering.
You were correct in reaching out to a friend. Your ex, on the other hand, was correct in getting angry. Yet ...
You needed to pick a better friend to confide in! Clearly, it was the kind of friend who believes "a secret is something you only tell one other person at a time, in whispers." You were betrayed, as you well know now.
My brother-in-law lost it one time with me ... had a quick outburst about his own SSM with my ex's older (and favorite) sister. If I had breathed a word about it to my ex at the time it would have turned into a 5-alarm fire in the family. These things are very very touchy.
Also, your ex is at fault. After she got her mad out, she should have realized that you must have been pushed to the limit to betray her privacy, and that maybe she should have spent some time looking inside herself.