We have a terrible habit of expecting others to act as we do. That's not a mental health issue for the other person. I'm not sure it's a mental health issue for anyone having these feelings.
What I know, from experiences and observations, is whatever reason someone else steps away may or may not be the same reasons you should.
Let's say you have a friend who is jealous of anyone more attractive or smarter. You think of yourself as equal to the friend, and by all outward appearances, perhaps even the most confidential appearances, that friend feels the same about you. IF they are hateful to someone who is actually more attractive, smarter, luckier, etc, does that person have the Right to step away?
Should they step away from you? You're never hateful. Quite the opposite, you're a big fan of the person, and want to be friends. You reach out and they explain they don't want to deal with it, as in your jealous friend. Do they have the Right?
Of course they do. If it's making you wonder if you should, perhaps your friend isn't that great to you either.
Now, if the person decides to tell you they can't be friends with you because of the other person, they have overstepped. Who you are friends with should never be limited by your other friends.
But now you have to look at the friend who doesn't like this person, and how awful they are to that person. Like it or not, you're allowing it if you say nothing, although the person may say nothing to that effect.
Which is the better friend to you? The one who made you think because they won't tolerate it or the one who seems to like you but expects you to confirm their hatred?
Sure, this happens at varying levels in all kinds of relationships from work to personal to familial. And here's the kicker: ONLY YOU can decide what is or isn't healthy for you, what you will or will not tolerate as far as your friends, circumstances, etc. Your limits are your own.
If you are "secretly worried", I would argue you know the answers, and the person is who you admire most while you question whether your friend is even a friend. Decide how "worried" you are and act accordingly.