If bleeding stops before the ten-day maximum and ghusl has not occurred, the passing of a complete prayer period is treated as a legal indicator related to the end of menstruation.
That does not mean prayer becomes valid without purification. The usual requirements for a valid prayer still apply.