They can't. Late developing males often appear female although apparently full grown, and old females can grow swords and even a gonopodium, but there's no recorded case of a functional female turning into a functional male.
Actually I have seen this sex changing thing happen with my sword tails in the past in my very own tank. The male dies so the dominant female takes on the role of the male if another male is not introduced into the tank in due time. Now weather or not this fish was actually a female that changed to a male without the presence of a male or it it as you said and the fish was just late in the development of the sex organs I do not know. All I know is it seemed very odd to me that that kind of thing could even happen in nature.

Marinemom