I have never heard of this. It doesn't sound biblical to me at all.
I have heard it said that John was cleansed of sin in that instant before he was born so he was convinced in sin, and was "born again" before even being born. I am not sure if this is doctrine or just the opinion of some people
It is biblical and one of the beautiful mysteries we celebrate called "The Visitation." I believe the Visitation was God's way of fulfilling the prophecy His Archangel Gabriel made in separate revelations to both Mary and Zachary. When Mary and Elizabeth came together in that awesome moment, the Holy Spirit blessed each of them with confirmation of the prophesies each had been given by Gabriel.
After Mary was greeted at her Annunciation, we read that she left in
haste to assist Elizabeth. She would have been only a few days pregnant, and not having any
evidence whatsoever that what Gabriel announced had already taken place. He only told her, "You
shall conceive..." (future tense, no date given)
Same with Elizabeth whose husband Zachary was told that their child
will be filled with the Holy Spirit
in her womb. (future tense, no evidence yet)
We know that any time an Angel is sent to man bringing God's prophecy, it is fulfilled. Elizabeth realized this when the babe in her womb leapt for joy,
confirming the prophecy to Zachary months earlier. I believe there was a special anointed "knowing" that she burst forth with, "How have I deserved that the mother of My Lord has come to me?"
And if Mary had no knowledge of having already conceived, she truly realized the fulfillment in that moment when Elizabeth
confirmed it to her, for God was already bestowing the Holy Spirit upon His Forerunner. Years later, St. John would proclaim from his understanding of this miraculous moment that "He who is to come after me will baptize you with the Holy Spirit."
My point in all of this is that John received the Holy Spirit in Elizabeth's womb at the presence of Jesus in Mary. An awesome, incredible moment for both women! Now if we believe that the Holy Spirit's bestowal brings sanctifying grace, then it is far more than just an actual grace. He was cleansed of original sin at that moment. For us who are baptized sacramentally to remove original sin, we receive the Spirit AND sanctifying grace. God is not bound by the sacraments alone. This was a very special anointing and gift of grace that John received.
Please note this important difference. Mary was
conceived without original sin, but John was not. He wasn't cleansed until 6 months in the womb.
Jeremiah was also cleansed in the womb.
Jeremiah 1:5 "Before thou camest forth out of the womb, I sanctified thee"; and again, to John the Baptist of whom it is written (
Luke 1:15): "He shall be filled with the Holy Ghost even from his mother's womb." It is therefore with reason that we believe the Blessed Virgin to have been sanctified before her birth from the womb.