I was looking through a necromancer class for pathfinder published by a third party source and I noticed a section that claims "At 3rd level, a necromancer gains Command Undead as a bonus feat." I was primarily wondering if this was possible, for a spell to function as a feat. If it is possible, how exactly does it work?
Spells and Feats are separate things
A spell can't be a feat, and a feat can't be a spell. When the class feature Command Undead states you gain Command Undead as a bonus feat, it must be talking about the feat Command Undead, not the spell Command Undead.
Yes, there are 3 different things all called Command Undead. Context is required to know which is referred to. Since the class feature says you gain it as a bonus feat, it can only be referring to the feat of the same name.
You are mixing the feat with the spell of same name
Pathfinder has a feat called Command Undead, and also a spell called Command Undead. Sometimes they get mixed up, but the context should be enough to clarify which one the text is talking about. Here, it says:
At 3rd level, a necromancer gains Command Undead as a bonus feat.
So, it's clear it is talking about the feat, Command Undead.