@sophie2001,
I'm assuming you're 11 or 12 from your handle, Sophie. You can't really force someone to choose you over another person, but you can make your own romantic interest clear. Boys are often shy about declaring themselves to a girl they like. You might need to take the initiative and ask him if he would like to do something special with you, like catch a movie or grab some ice cream. It might not have occurred to him that you are interested in him other than as a friend. Most boys find this pretty flattering, and it changes how they see you. He might decide he just wants to be friends, which can be tough to hear. But if you never take the chance you'll definitely never get to have a boyfriend!
Don't worry too much about your friend. If he chooses her or another girl, there's not much you can do about it. I would make it clear to her that you are interested in him too and would appreciate if she would not flirt with him unless she seriously wanted to date him. I'm not sure you can fairly tell her not to date him, although it would be reasonable to let her know that you have a special interest in him.