These are actually two questions:
1) Generally: is it selfish to create your happiness at the expense of someone else?
Quite philosophical here, but I'd suggest the degree of "selfishness" depends on the degrees of unhappiness/happiness you create. Is it selfish to steal bread if you're going into hypoglycemic shock? Yes. The bakery will be mildly unhappy. On the other hand, you were going into a coma and you're very happy for that bread. "Is it morally justifiable?" becomes the question, and I think any reasonable person would agree a small degree of unhappiness (bread theft) to create a large degree of happiness (life saved) is justified.
2) In your case: is it selfish to say something about your feelings while your friend has an SO? Again, I think we can throw the idea of "selfish" out the window, and go with "is it morally justifiable?" again. And that depends on a lot more information. Things like how happy is their relationship, how deep are your feelings, what's the chance of reciprocation, etc. all come into play.
Is it "selfish" if she's been happily married for 10 years, has 3 young kids, a house with him, is financially dependent on him, has never expressed interest in you .... and you kinda like her boobs and want a quick romp? YES, overwhelming so.
Is it "selfish" if she's been seeing him for 3 months, he's abusive, she's unhappy, has flirted with you in the past, stays because she's afraid she'll never find anyone else .... and you love her deeply and want a longterm relationship? NO, not at all.