Dating a friends ex-boyfriend can be a tricky thing to accomplish. If you handle it right the three of you can remain friends. If you handle it wrong, someone's gotta go. If you are honest about your feelings for him to your girlfriend then she may very well be understanding when the subject comes up, especially if they broke up amicably. If their break up was just this side of a nuclear holocaust then she may feel a little differently.
No matter how the break up went, she may not want you dating a friends ex-boyfriend anyway. I think if you were the friend you say you are then you should respect her wishes and steer clear of him especially if they just did break up. If you were the cause of the break up then I guess it would be ok to continue to see him, just know that you have probably lost a friend.
If their break up happened months or even a year ago then talk to her about what you want. If the two of you can come to some understanding of the whole situation then maybe she could see her way clear to being ok with the two of you dating. Every one is different and the two of you may be a better match than he and she were. Time will tell.
She will also come to know that you are respectful enough of her feelings to come to her and talk this possible sticky situation through before it gets sticky. I know you have seen the cell phone commercial with the two guys on the ski lift and the one asks the other if he would mind if he asked his ex out? The one who is the ex says no but then gets jealous of the conversation she starts having with the new guy and the ex throws the cell phone off the ski lift. Do not lose your friend or your phone. Be discreet and do not hurt anyone's feelings
She may be more agreeable to you two dating and having a relationship if she is happy in her own relationship. Like I said if the relationship just ended then steer clear for a while, do not be the rebound relationship. They rarely ever work and then there is just more hurt to spread around. So, make sure their relationship is really over before jumping in the fray.
If your friend and the ex move in the same circles then you are all bound to run into each other and this may get a little awkward. Right at the beginning you may want to frequent different places until your relationship is on better footing then start going to the places you always go. When you all run into each other this should soften the blow somewhat.
Be aware of her feelings, when she does see two you together for the first time she may feel a little jealous and old feelings may come flooding back. Maybe some feelings she does not really want to experience at this moment. So just be discreet until she gets used to the whole idea of you dating a friends ex-boyfriend.