This is indeed already part of Thesis Number 75 of those famous 95:
Opinari venias papales tantas esse, ut solvere possint hominem, etiam si quis per impossibile dei genitricem violasset, Est insanire.
Translated into modern English as:
75 To consider papal indulgences so great that they could absolve a man even if he had done the impossible and had violated the Mother of God is madness.
— Martin Luther and his 95 Theses
Unfortunately, Martin Luther isn't known for absolute reliability but rather for polemics. And in this case it is hearsay, brought to his ears by his visitors.
As he himself wrote in the first part of this letter to the Arch-Bishop Albrecht of Brandenburg archbishop of Mainz and Magdeburg on October 31, 1517:
Praedicatorum exclamationes, quas non audivi.
~ Those things the preachers said which I did not hear… [Full English translation, including both his admittance to hearsay and the Virgin Mary line… ]
It has since been debated whether the lay listeners who told Luther just misunderstood something or whether that there must have been 'something' to it. But it looks like proof for papal permission of this specific sales tactic will be impossible to come by. The pope entrusted the archbishop to manage this, the archbishop then instructed Tetzel with written instructions in "Instructio summaria ad Subcommissarios Poenitentiarum et Confessores."
These instructions are excerpted for example in
— Walther Köhler: "Dokumente zum Ablasstreit von 1517", J.C.B. Mohr: Tübingen, Leipzig, 1902. (archive.org, p 104).
In that collection we also find Tetzel's (in collaboration with Wimpina) direct reply to thesis 75 (p139), somewhat evading the concrete issue, but it could be read as to indirectly justify his (actual) sermons with a testimonial from the Gospels, here Mt 12,32, explaining that 'if a sin against even the Son' is remissible, then it would indeed follow, that…)
Luther repeated this allegation with directly mentioning Tetzel and the claimed papal authority for this in his polemic pamphlet 'Wider Hanns Worst':
Nu, da ich zur rechten ursachen des Lutherischen Lermens kome, lies ich alles also gehen, wie es gieng. In das kömpt fur mich, Wie der Detzel hette geprediget grewlich schreckliche Artickel, der ich das mal etliche wil nennen, Nemlich:
Er hette solche Gnade und gewalt vom Bapst, wenn einer gleich die die heilige Jungfraw Maria Gottes Mutter hette geschwecht oder geschwengert, so kündte ers vergeben, wo der selb in den Kasten legt, was sich gebürt
— Luther: "Wider Hanns Worst", 1541. Werke. Kritische Gesamtausgabe. [Hrsg. von J.K.F. Knaake et al.] archive.org, p539
~ Now that I have come to the right causes of the Lutheran noise, I let everything go as it went. However, I was struck by how Tetzel had preached horrible and terrible articles, of which I will now name several, namely:
He would have such grace and authority, from the Pope, that if anyone had weakened or impregnated the Blessed Virgin Mary, the Mother of God, he could forgive them, if they put what was due into the box.
Note that this is long after Tetzel died in 1519. It is quite noteworthy that if the incident is reported with a location attached to it, that most often Halle is named. But the interesting thing is that while Tetzel indeed showed up at Halle, the occasion to finally prompt Luther to erupt in open writings was when Tetzel showed up at Jüterborg, tempting Luther's own parishioners to go there and buy indulgences.
(Cf — Will Durant: "The Story Of Civilization: Part VI. The
Reformation. A History of European Civilization from Wyclif to Calvin: 1300-1564", Simon and Schuster: New York, 1957. pp338–341 several versions on archive.org)
This is quite significant as the archbishop for Mainz and Magdeburg, Albrecht, was at that time residing himself in Halle, not in Mainz as the letter quoted above might suggest at first glance. So Albrecht himself would have been much closer to the alleged events 'in Halle' prior to 1518 than Luther himself who send said letter to Albrecht in Halle.
At first this accusation of heresy was denied by Tetzel himself and his two (Catholic) witnesses seemed to have confirmed its untruth. But it didn't help his cause in the eyes of the protestants that his defenders like Eck claimed in disputations that they wouldn't need to defend this — really meaning all (?) indulgences — as by papal intent and authority 'it would have been OK anyway'.
( Cf — Hugo Wismeidern: "Historische Untersuchung ob die bekannte Lästerung wider die heil Mutter Gottes dem päpstlich Ablaß-Crämer Johann Tetzeln mit Grund der Wahrheit zugeschrieben werden könne", Meyers seel Wittwe: Jena, 1714, p12.)
Many sources to check, but with all due caution: it seems that Tetzel might have said something to that effect indeed, but in doing so he might have been overshooting a little, since a micro-management permit from the pope for such a claim seems unlikely.
(– Friedrich Gottlob Hofmann, (Maximilian Poppe ed): "Lebensbeschreibung des Ablaßpredigers D. Johann Tezel: ein Beitrag zur Geschichte der deutschen Kirchenreformation im sechszehnten Jahrhundert", Schwickert: Leipzig, 1844. pp25–30 urn:nbn:de:hbz:061:1-481525.)
However, there seems to be very little direct evidence for Tetzel either violating church law or behaving inappropriately in his preaching of the indulgence, something an analysis on Tetzel's career by Nikolaus Paulus highlights, with the caveat that between the crucial years of 1510–1516 the documentary record for his activities is more sparse than for either before or after.
What is certain is that his lines about "…in the coffer rings / …soul into heaven springs" are authentic, the basal church policy for this since 1476 in use, in Latin, but internally criticized since 1482, even (probably) criticized by Pope Leo X, and when translated by Tetzel into the vernacular also distorted from the Latin intent. As a salesman his intentions were surely in line, but some of the sayings an exaggeration of the contents of official doctrine.
(— Nikolaus Paulus: "Johann Tetzel der Ablaßprediger", Franz Krichheim: Mainz, 1899. archive.org esp pp152–183)
Most scholars trying to illuminate this issue are Protestants. Those mentioned for the sources so far are also quite outdated. But even more recent authors argue in the very same direction:
It is well known that Tetzel preached that the plenary indulgence he offered was so effective that even someone who had raped and impregnated the Mother of God could be absolved of it and obtain complete forgiveness of all sins. Tetzel vigorously denied that he had ever said such a thing and tried to produce credible witnesses to exonerate him. Of course, it cannot be ruled out that he or someone in his circle did stoop to such an extreme statement. After all, it was common teaching that even the betrayal of Judas, who brought Christ to the cross, could have been forgiven by God if Judas had repented of his sin and entrusted himself to God's forgiving mercy. The comparison with the betrayer Peter, who denied Jesus three times, shows that it was not the betrayal itself that led Judas to hell, but his despair. Within these theological coordinates, it had to be considered false doctrine around 1500 to claim that such a terrible crime against Mary was a sin that could not be forgiven.
— Berndt Hamm: "Johann Tetzel in neuem Licht",
Vortrag in Leipzig am 10. Oktober 2017 bei der Präsentation des Ausstellungs-Begleitbandes „Johann Tetzel und der Ablass“, in: Karlheinz Blaschke, Enno Bünz, Winfried Müller, Martina Schattkowsky & Uwe Schirmer (eds): "Neues Archiv für sächsische Geschichte, Vol 89 2018", Verlag Ph. C. W. Schmidt: Neustadt an der Aisch, 2019. pp 265–282. (quocosa)