For reference, Avenging Spirit came out to arcade in 1991. It was not the first game to use possession as a game mechanic.
The oldest game to use possession as a game mechanic appears to be "Relics", which was released by Bothtec in February of 1986.
TV Tropes has a page dedicated to this mechanic; Body Surf. Sometimes the mechanic is more of a element to the story, but most of the listings under Video Games detail games that provide this mechanic. Avenging Spirit is one of the first examples listed.
One entry stands out:
- In Relics (an old Japanese computer game by Bothtec), the player character was a shade that could possess various creatures.
- "Body Surf" @ TVTropes.org
Firstly, it is the one game that does not have any further links. Secondly, it is only listed as an "old Japanese computer game".
On further investigation, Moby Games list the title as having been first released in 1986. It also provides a better description of the mechanics:
Relics is an action-adventure game where players take the role of a spirit who can possess different characters. ... Players can possess other bodies after killing their owners
"Relics" @ MobyGames.com
It's definitely the oldest one on the list, and I can't find any other contender, so it looks like the earliest game to use character possession as a mechanic is Bothtec's "Relics", which came out in February of 1986.
Here are some other video games that used possession as a gameplay mechanic.
"Relics: Ankoku Yōsai"
The sequel to "Relics" came out one year later, in 1987. It was released to the NES, and while it still inherited the possession mechanic from its prequel, the mechanic was more limited. Rather than being able to swap bodies on the fly, players would need to meet certain conditions, first.
"Glory of Heracles IV: Gift from the Gods"
The fourth title in the "Glory of Heracles" series was released in 1994. In this game, the player is given the ability to possess others to help them fight, after being trapped in Pandora's box and turned into a dog.
"Super Mario Odyssey"
While certainly not the first, "Super Mario Odyssey" is a more recent and well known title that uses this mechanic. In this game, Mario teams up with a sentient hat, named Cappy.
Much of the game centres around solving puzzles by possessing other characters. Characters are possessed by throwing Cappy at them, and most (if not all) of the games enemies are controllable.
The "Prototype" Series
Again, we have a much more recent title, but this one also works a little bit differently. In the "Prototype" series, you are absorbing NPCs, rather than possessing them. You still take on their likeness and memories, so one could argue the similarities between the two.
This is used as a mechanic, where you need to absorb particular NPCs to obtain their appearance, memories or particular skills. While not exactly possession, it is a similar mechanic, and is an interesting example for comparison.