No, it's terribly wrong for your friends or boyfriend to make you choose.
However, people do it without realising sometimes. One of my old friends did not like my boyfriend at all, thought he was too old, and completely wrong for me. Yet time and again we proved them wrong. My friend treated my partner really badly when we went out, so I said I couldn't handle it anymore and told my friend that either he should live with it or forget our friendship. And he chose the latter. It was my decision to say it to him. But I felt I had to.