You cannot teleport with an active attack rally march or while your troops are reinforcing in a defensive rally.
If the rally defender decides to teleport before the rally march left, the rally timer will continue, and the rally march will start to the new location.
The rally defender can teleport during the rally attack march in any place, and the attack will happen instantly and the units from the offensive march will come back to their bases from the coordinates of the attack.