The reason why Rand can fly and teleport during the battle against Ba'alzamon is because it takes place entirely in Tel'haran'rhiod, the Dream World, which is where Bal'azamon was all this time, hence why he kept appearing in the three boys' dreams. He does those things without really knowing...