A player can only turn the enemy flag in if their own flag is at their base. They can also return their own flag to base by walking over it, if it's on the ground.