The matter is simple as said by @Yas in the comment and in the given answer.
A major condition for the validity of a prayer is ritual purity, without it your prayer is invalid and there's no second option to obtain it except with performing ghusl. It doesn't make a difference whether there's even 1 min. left or less that's the view of the majority of scholars other said he is allowed to perform tayammum:
Ibn Qudaamah said, explaining the view of the majority: If water is available but the effort to acquire it and use it means that the time will end, it is not permissible for him to do tayammum, whether he is at home or travelling, according to the majority of scholars including al-Shaafa’i, Abu Thawr, Ibn al-Mundhir, and as-haab al-ra’i. It was narrated from al-Awzaa’i and al-Thawri that he may do tayammum. That was narrated from them by al-Waleed ibn Muslim. End quote from al-Mughni (1/166). (Source islamqa #94311)
Ibn Qudamah added in his al-Mughni -see here in Arabic-:
In the following I will translate from Arabic, if I didn't add a source of the translation, the translation is mine take it carefully!
قال الوليد : فذكرت ذلك لمالك ، وابن أبي ذئب ، وسعيد بن عبد العزيز ، فقالوا : يغتسل ، وإن طلعت الشمس ; وذلك لقول الله تعالى : { فلم تجدوا ماء فتيمموا } وحديث أبي ذر ، وهذا واجد للماء ; ولأنه قادر على الماء ، فلم يجز له التيمم ، كما لو لم يخف فوت الوقت ; ولأن الطهارة شرط ، فلم يبح تركها خيفة فوت وقتها ، كسائر شرائطها .
Al-Walid said: I've mentioned that (about Tayammum) to Malik and ibn Abi a-Dh'ib and Sa'id ibn 'Abd al-'Aziz they answered: he must take a ghusl, even if the sun rises, because of what Allah the Almighty said: "...and find no water, ...(4:43 and 5:6) and the hadith of abu Dharr, and this person actually has water, and is able to use it, so tayammum is not allowed for him. Similar to the case he didn't worry missing the prayer on time: the taharah (ritual purity) is a condition (for the validity), so it is not allowed to leave it aside worrying to miss the prayer on time, euqaly to any other condition of the prayer.
The hadith of abu Dharr referred to here seems to be this hadith which appears in at-Tabaranis al-Awsat which is quoted with somewhat different wordings or additions in Sunan abi Dawod, Sunan an-Nasa-i and Jami' at-Tirmidhi and others with the important statement:
..."Clean earth is a means for ablution for a Muslim, even for ten(In at_Tabarni's al-Awsat twenty) years (he does not find water); but when you find water, you should make it touch your skin, for that is better"
You may further read in the fatwa above:
Shaykh al-Islam Ibn Taymiyah (may Allaah have mercy on him) said: If a person wakes up at the end of the time for prayer and he is junub and is afraid that if he does ghusl the time for the prayer will end, he should do ghusl and pray, even if the time does end. The same applies to one who forgets it. End quote from al-Ikhtiyaaraat al-Fiqhiyyah. (Source same fatwa from islamqa as quoted above)
This fatwa from islamweb #129516 quotes a statement from ibn Taymiyyah saying abit otherwise than that quoted by ibn Quddamah: It is adding to majority abu Hanifa, a-Shafi'i and Ahmad and counting among those who permit prayer with tayammum imam Malik. I've heard something like this too, but I guess that this is only to ensure praying on time and that the prayer must be redone once one had taken ghusl.
On the whole scholars have these two options to re-establish the state of taharah: performing ghusl no matter if one may miss the time for the prayer or performing tayammum to be able to pray on time, but this doesn't re-establish taharah correctly and has very weak backup as quoted in the quotes from al-Mughni. It shouldn't be more important to pray on time than praying a valid prayer.