Another option is to simply use the Join command:
First half of the mission, the unit is on its 'normal' side (say, OPFOR Especas).
Second half of the mission, the unit has switched to resistance. This you can do simply by taking the unit, and Joining that unit (so that the unit does not take command over, but is subordinate to) another unit on the enemy side.
[unitname] Join(Silent) commandingofficer.
(there is also a command called JoinSilent which will omit the "2, follow 1" radio messages).
After that, you can simply deletevehicle the commandingofficer unit right away, and your unit should now have switched sides.
Non-tested, but should work!
A safer alternative if the first half of the mission does not involve any combat, is to simply make the unit a part of the other side from the beginning, and using setcaptive to make sure his friends don't attack him. In this case he can't be a part of a group of course. Same MO though : group him with a higher-ranking unit at mission start, and simply give the higher-ranking unit a probability of presence of 0%.
Good luck!
Wolfrug out.