I read this book and its companions when I was younger; It's a series of four books by Jack Chalker called The Four Lords of the Diamond. You might be able to get them on Amazon. You're remembering the third book "Charon: A Dragon at the Gate"
The four Lords of the Diamond are prisoners on four planets in a solar system that is used as a prison because the planets have a symbiotic organism that infects all who are on the planets and will kill anyone infected if they leave the system.
This parasite infects everything and can communicate amongst itself, no matter what is infected with it. On one planet this communication allows someone who is more willful and in control of themselves to use the symbionts to change shape, similar to magic. On another planet it allows people to swap bodies.
The agent is on a ship outside the system and is using four bodies sent to each planet, to flush out a contact that is dealing with aliens and planning an invasion. On one planet, his surrogate body is morphed into a creature, by the bad guy in order to hamper his investigation.
Very interesting idea for the series, and even though the same agent is "present" on each of the four worlds, the stories do not unfold the same way in each book. Environment and experiences influence each individual agent differently on each planet.