There's an old saying of "any friend of theirs is a friend of mine" so shouldn't that work the same way for the case of an enemy?
I'd say no, because the saying itself is silly and doesn't really work in the first place.
Wouldn't it be more acceptable to listen to a friend's drama and show your loyalty to the friendship by avoiding their enemies as well?
Not in my view. I see this as pretty much the same thing as not being friends with someone who hurt your friend - it creates an issue between you and someone you don't know / have no problem of your own with for no real reason.