In which sutta does the Buddha state that he does not have to follow all the monastic rules and austerities closely because he is already liberated and free, as an arahant?
I remember reading this recently but I couldn't easily find it again.
In which sutta does the Buddha state that he does not have to follow all the monastic rules
I found it in Khuddakanikāya » Apadāna-aṭṭhakathā » Buddhavagga » Buddhaapadānavaṇṇanā.
No mention about austerities.
because he is already liberated and free, as an arahant?
It is not because he has liberated, but because he is the Budhha. Therein the Buddha states that the Buddha is the commander of Bhikkhus and rules are only for the disciples.
Having known the Buddha has prohibited monks from showing supernatural powers, the Titthiyas spread the news that they are ready o show supernatural powers. Then the king Bimbisara took this message to the Buddha. Then the Buddha replied "I too, great king, will show the supernatural powers".
Then the king asked back "Hasn't a rule laid down by he Buddha prohibiting it?". Then the Buddha questioned him "When you lay down fines for the people who eat mangoes from your park, do you lay down fines for yourself too? The king replied "No bhante". "Likewise, great king, there is no rules laid down for me", the Buddha replied.
Since there is no any English translation available with me, I would quote the Pali passage.
Apadāna-aṭṭhakathā » Buddhaapadānavaṇṇanā
Tato titthiyā “Samaṇena kira gotamena sāvakānaṃ sikkhāpadaṃ paññattaṃ, te jīvitahetupi taṃ nātikkamanti, mayaṃ iddhipāṭihāriyaṃ karissāmā”ti tattha tattha rāsibhūtā kolāhalamakaṃsu. Atha rājā bimbisāro taṃ sutvā bhagavato santikaṃ gantvā vanditvā ekamantaṃ nisinno bhagavantamevamāha – “Titthiyā, bhante, ‘Iddhipāṭihāriyaṃ karissāmā’ti ugghosentī”ti. “Ahampi, mahārāja, karissāmī”ti. “Nanu, bhante, bhagavatā sāvakānaṃ sikkhāpadaṃ paññatta”nti. “tameva, mahārāja, pucchissāmi, tavuyyāne ambaphalādīni khādantānaṃ ‘Ettako daṇḍo’ti daṇḍaṃ ṭhapento tavāpi ekato katvā ṭhapesī”ti. “Na mayhaṃ, bhante, daṇḍo”ti. “Evaṃ, mahārāja, na mayhaṃ sikkhāpadaṃ paññattaṃ atthī”ti. “Kattha, bhante, pāṭihāriyaṃ bhavissatī”ti? “Sāvatthiyā samīpe kaṇḍambarukkhamūle, mahārājā”ti. “Sādhu, bhante, taṃ passissāmā”ti. Tato titthiyā “Kaṇḍambarukkhamūle kira pāṭihāriyaṃ bhavissatī”ti sutvā nagarassa sāmantā ambarukkhe chedāpesuṃ, nāgarā mahāaṅgaṇaṭṭhāne mañcātimañcaṃ aṭṭādayo bandhiṃsu, sakalajambudīpavāsino rāsibhūtā puratthimadisāyameva dvādasayojanāni pharitvā aṭṭhaṃsu. Sesadisāsupi tadanurūpenākārena sannipatiṃsu.
Normally, the Buddha is in rule like his monks according to DN1, DN2, etc., which is memorized by his long term follower, ven. Ananda. Ven. Ananda must say the other note in the commentary like in Devorohanavatthu if the Buddha play out off the rule. But is there is nothing like that. The only one is allowing the Buddha to the Supernatural Power to the public, which can help people to enlighten follow the Buddha teaching in some situation.
It might have been a misreading. It's right that Arahats have no more requirement to go after the training itself, yet they are of course "bound" to the rules. Nevertheless the Sublime urged them also to dwell "heedful" (within the eightfold path) as else would be burdensome for them.
There are also plenty teachings that Arahats do not abandon virtues, even if no more obligations at all.