Yes, it is correct to say the Prophet ﷺ was allowed to do things that are not permitted for others. However, this is the exception. The general rule is that the Sharia was the same for the holy Prophet ﷺ and the Ummah.
عَنْ عَائِشَةَ رَضِيَ اللَّهُ عَنْهَا، قَالَتْ: «نَهَى رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ عَنِ الوِصَالِ رَحْمَةً لَهُمْ»، فَقَالُوا: إِنَّكَ تُوَاصِلُ، قَالَ: إِنِّي لَسْتُ كَهَيْئَتِكُمْ إِنِّي يُطْعِمُنِي رَبِّي وَيَسْقِينِ
(Sayidah) Aishah (May Allah Most High be pleased with her) said, The Prophet ﷺ prohibited (his companions) from observing continuous fasting without a break (Sowm al-Wisaal) out of mercy for them. They said, ‘Indeed you fast continuously.’ He ﷺ replied, ‘I am not like you. Indeed my Lord provides me with food and drink.’ (Sahih al-Bukhari, 1964).
In the Hadith above the holy Prophet is preventing the Sahabah from practicing Sowm al-Wisaal (continuous fasting), whilst he himself ﷺ practiced it. Sowm al-Wisaal is to refrain from ending the fast at sunset. Rather one continues to fast all night and into the next day. This is an example of the Prophet ﷺ being allowed to do things that are not permitted for others. Relatively few such rulings exists and they are often referred to as Khasais of the Prophet ﷺ.
The holy Prophet ﷺ clarified, ‘I am not like you. Indeed my Lord provides me with food and drink.’ Not only does this remind us of the great rank of the Prophet ﷺ, even the Sahabah were not like the Prophet ﷺ. Rather the rank of the Prophet is unique. This statement also explains that certain rulings are different for the holy Prophet ﷺ. In another narration the Prophet ﷺ alluded to the nearness he ﷺ enjoys with Allah Most High.
عَنْ أَبِي هُرَيْرَةَ، قَالَ: وَاصَلَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ، فَبَلَغَ ذَلِكَ النَّاسَ فَوَاصَلُوا، فَبَلَغَ ذَلِكَ رَسُولَ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ فَنَهَاهُمْ، وَقَالَ: إِنِّي لَسْتُ مِثْلَكُمْ، إِنِّي أَظَلُّ عِنْدَ رَبِّي فَيُطْعِمُنِي وَيَسْقِينِي
(Sayidina) Abu Hurairah (May Allah Most High be pleased with him) said, the Prophet ﷺ practiced Sowm al-Wisaal. The companions came to know of it, so they practiced it too. This reached the Messenger of Allah ﷺ so he ﷺ prohibited them and said, ‘I am not like you, I remain with my Lord. He gives me food and drink.’ (Musnad Ahmad 7473, Sahih).
Imam Ibn Katheer commented upon these narrations in his Tafseer and explained that the food and drink given to the blessed Prophet ﷺ was not physical.
وَثَبَتَ أَنَّهُ مِنْ خَصَائِصِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ، وَأَنَّهُ كَانَ يُقَوَّى عَلَى ذَلِكَ وَيُعَانُ، وَالْأَظْهَرُ أَنَّ ذَلِكَ الطَّعَامَ وَالشَّرَابَ فِي حَقِّهِ إِنَّمَا كَانَ مَعْنَوِيًّا لَا حِسِّيًّا، وَإِلَّا فَلَا يَكُونُ مُوَاصِلًا مَعَ الْحِسِّيِّ. (تفسير القرآن العظيم)
Therefore it is established to be from the Khasais (specific rulings) of the Prophet ﷺ. Indeed he ﷺ had the strength to do that and was assisted. It is evident that the food and drink provided to him ﷺ was not physical rather from the unseen. Otherwise he ﷺ would not be considered to be engaging in Sowm al-Wisaal whilst consuming physical food and drink. (Imam Imad al-Deen Ibn Katheer, Tafseer al-Quran al-Adheem).
It is important for Muslims to studies subjects like Seerah (Prophetic biography) and Shamail (Prophetic descriptions), in order to learn more about the holy Prophet ﷺ. The love we have for our Prophet ﷺ dictates that we study such subjects. Add to this the fact that so many people are misrepresenting the holy Prophet ﷺ in contemporary times, and it makes it even more urgent for us to study about our prophet ﷺ.
And Allah Most High Knows Best
-Answered by Shaykh Noorud-deen Rashid (18.04.2022)
Who will the holy prophet ﷺ intercede for?
See also video: