I hate these threads. Not because of the OP, but all the users swanning in to kick someone while they're down about how supposedly "unreasonable" they are and how they don't own a name. It really grinds my gears.
If you've explicitly had a conversation with someone detailing that you have chosen x name, it is dickish for that person to use the name if they're still friends with you when they're due to give birth. It shows no respect for the friendship. If you like the name and it's also on your list, you say at the time "oh that's funny we love that name too!" This gives the other person time to get used to it or find another name.
Of course, if you haven't had a discussion but you love the name 'Molly', and your friend uses 'Molly', you can feel annoyed but you can't be annoyed at your friend. She didn't know.
It's even worse when it's a family member as said person will always be around the child called Molly. If it's a coworker, it's not as bad- chances are one of you will leave your job and not see/hear much from them.
Picking a name is personal. People should be more respectful. This is exactly why I only ever had one discussion with my friends about my baby name choices for DD. I thought it would be a nice thing to discuss once, so I said a few of my boys names. One of my friends immediately piped up saying she liked all of my boys names. I quickly learnt that some people do get weirdly competitive and if I wanted to pick a name myself and my partner loved without interference, I'd be better off not discussing it. It can work both ways, too.
I'm sorry OP had to learn this lesson the harsh way, but it really is better never discussing it. The less people know and the less you know, the lesser the chance anyone is upset.