Also, it's important to note that both times she showed interest in you, she'd been drinking. That's a terribly manipulative thing to do. She goes out, drinks and parties, and then is like, "Oh, S is into me. I would love some attention. I'm going to hit him up because I know he really likes me."
I know this game -- I've played it many, many times. She's hurt from her breakup. You're her ex's friend and you're really attracted to her. You are the perfect person to piss him off. You are being put through the ringer here. But listen to me: THIS ISN'T GOING ANYWHERE GOOD.
If this were a real attraction with actual feelings, you wouldn't need your friend's permission to date his ex. He ended the relationship, and they're both technically free agents now. No one gets to lay claim on other human beings. Now, you absolutely should have gone to your friend first to tell him you were interested in her. It's about respect. He's your friend and doing something behind his back was absolutely sketchy. If I were him, I'd be angry too.