Yikes. Try talking to your friend because it wouldnt really be fair for either one of you to date the girl in front of the other. So either way one of you guys would be mad and the friendship would most likely get ruined.
you can't just stop something like that. But, if you really don't want them to with her, tell your friend how you like this girl too. That may make it awkward for them to date her, but at the same time that also goes for you