Most Helpful Guy
First of all, the heart wants what the heart wants, but in this case, it sounds like this girl is pulling both of your strings. I'm not going to lay blame on her, but before I say what I'll say - there are women that get off on doing things like this, so you really need to be careful with that one. And if she'll do it to your friend, she'll do it to you.
Secondly, you really need to tell your friend. If your friend and that girl aren't actually 'dating' but have just been talking and showing interest in each other, then she's "technically" fair game. That said, what you did to your friend was just wrong and when she came on to you, you should have told your friend immediately. It's likely he would have said "aight playa', have at it" - he might have understood more than you know unless he's head-over-heels for her, in which case you would have known that to begin with and makes what you did that much worse!!
So if your friend and her aren't actually in a relationship, you need to tell him that it happened. You need to tell him that it wasn't planned, and you really felt like shit about it and still do. He will probably be pissed at you, and you'll deserve it, but at the same time it will show him that you value his friendship.
There are billions of women on this Earth and finding a woman that you have a 'connection' with is fairly easy, but you cannot replace a lifelong friendship - you just can't. So you have a decision to make: is she worth losing a lifelong friend over? Is she really? And the other question is "can you trust her?"
You're gonna' have to man the fuck up and let him know what's up, and if you decide you need this girl, then you're going to have to tell her to stop playing with him.
The heart wants what the heart wants, but you could've handled the situation a lot better, so now you have a responsibility to be honest with your friend and try to get ahead of this thing.
Hope this helps.