While I was praying, someone mentioned the Prophet's name. Is it compulsory on me to invoke blessing upon him? When we recite a verse that has Sajdah in prayer, is it compulsory to prostrate?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Whoever is in prayer has to complete it and never interrupt its continuation for any reason, because the prayer is a great occupation.
Ibn Taymiyyah said: ‘When a praying person hears a Muath-thin calling for the prayer, he has to complete his prayer and not repeat what the Muath-thin says. This is the opinion of the majority of the scholars. But if the person is outside the prayer reading the Quran, or doing any other form of Thikr (mention of Allah, or supplication), he should interrupt that and repeat what the Muath-thin says because repeating what the Muath-thin says is a temporary form of worship that is done in a fixed time and its time will pass while the Thikr can be done anytime and interrupting it for a legal reason is lawful unlike the prayer which must be done without interruption.”
Ibn Daqeeq al-‘Eed (a Muslim scholar) mentioned three different opinions of scholars regarding this issue; i.e. answering the Muath-thin during the prayer.
The first opinion is that he should answer the Muath-thin. The second opinion is that he should not answer him. The third opinion differentiates between obligatory prayers and supererogatory prayers.
The second opinion is the most preponderant. The same rule applies to invoking blessings on the Prophet when due, as both answering the Muath-thin and invoking blessings on the Prophet are forms of worship that should be done whenever they become due.
As for Sujood at-Tilaawa (the prostration for the recitation of the Quran); then if you are praying and you hear somebody else reading a verse of prostration, you should continue praying and not prostrate.
If the person reading the verse is the Imam, then you have to prostrate following his prostration as the Prophet said: “The Imam is there to be followed in all his acts.” If the one praying is the one who recites the prostration verse, then it is desirable for him to prostrate but it is not obligatory.
For more benefit, please refer to Fataawa 238741 and 348391.
Allah knows best.
You can search for fatwa through many choices