This bug requires that your hero stands on the edge of an opponents influence zone. When the zone expands, you will be inside the enemy territory. However, any attempt to move results in the pop-up box asking whether or not you wish to go to war. Choosing 'no' will mean your character cannot move. Not even out of the foreign territory. The only way to move and retrieve your hero is to choose the option to declare war.
--LordPixie