Consider the Interaction at Hand
There is no game definition of what is a friend. However, the PHB does tell us what being "friendly" means (p. 185):
In general terms, an NPC’s attitude toward you is described as friendly, indifferent, or hostile. Friendly NPCs are predisposed to help you, and hostile ones are inclined to get in your way
Thus, a "friend" of the Barbarian is someone who is predisposed to help them. Now, you could go down a rabbit hole questioning what this means - what if they are a spy and only pretending to help them? What if they personally don't like the Barbarian but their master has ordered them to help? What if they like the Barbarian but it is not reciprocated? Fortunately, you are not adjudicating a Wand of Enemy Detection, where motivation is relevant. Rather, this is a combat ability - you only need to define what a friend is for the combat at hand.
Both mechanistically and thematically, the Wolf Totem Barbarian's ability is similar to Pack Tactics. My closest personal experience with this came when, as a graduate student in Brazil, I took a wrong turn walking back from lunch and instead of arriving at the Uni, I found myself alongside an overgrown riverbank in the territory of a pack of feral dogs. The big dogs would charge forward to menace me, threatening to bite, but staying just out of my reach so long as I was facing them. The little dogs would then come in behind me and actually bite my ankles and legs when I could not see them or respond. It was well-coordinated and terrorizing - a bit of googling will likely find you a video of an actual wolf pack taking down something like a bull elk in a similar manner.
As the "leader of hunters", this strategy is what the Barbarian's ability is simulating. From the Barbarian's perspective, a "friend" is an ally in combat - someone for whom the Barbarian is willing to risk themselves by attacking from the front, in order to give their friend advantage on their attacks. From the friend's perspective, it is someone who trusts the Barbarian enough to know that they will not back away and allow the target to turn on them, and trusts the Barbarian enough to allow openings when the Barbarian could actually attack them if desired.
Thus, you need only consider the motivations of the parties involved for this particular combat. Is the Barbarian predisposed to take a hit so that the hired escort can get in a better shot? Then the escort is a friend. Is the skeleton controlled by the party necromancer restricting its movement around the target so as to not allow the Barbarian opportunity attacks on itself because it obeys the necromancer, not the Barbarian? Then it is not a friend.