In my campaign, I'm planning to have an NPC ghost possess an NPC vampire.
Is this even possible?
Role-playing Games Stack Exchange is a question and answer site for gamemasters and players of tabletop, paper-and-pencil role-playing games. It only takes a minute to sign up.Sign up to join this community
The answer to your question is of course yes, because as the DM, you control the world, and things work how you say they work. If that's how ghosts and vampires work in your world, then that's how it works.
What I imagine you actually meant is whether the official ghost in the Monster Manual can possess an official vampire in the Monster Manual, to which the answer is no. The Possession ability specifies that it targets a humanoid:
One humanoid that the ghost can see within 5 ft. of it must succeed on a DC 13 Charisma saving throw or be possessed by the ghost...
and a Vampire is not technically a humanoid but an undead:
Medium undead (shapechanger), lawful evil
Humanoid is a creature type, like undead, construct, or monstrosity, and vampires are not of that creature type, even though you could describe their traditional body structure with the adjective "humanoid."