What’s the word to describe a person in this role?
Solution 1:
Possibilities include:
- a secret accomplice
- a secret confederate
- a secret co-conspirator
- a shill
- a plant
- a ringer
You could use hidden or unknown or some such in lieu of secret. The entries without secret already contain that element built right into them.
Solution 2:
The first word that comes to mind for me is
"a stooge [in the audience]" - any underling, assistant, or accomplice.
There are lots of alternatives. I've linked there to synonyms for shill, but I think that's more strongly associated with fake buyers (in an auction, for example), rather than accomplices in a prank. The best of the rest is probably plain and simple plant.