Imam insisting on adding a rak‘ah
Question

If the imam gets up after completing the prayer and before saying the salaam to do an extra rak‘ah, and those who are praying behind him realise that and alert him by saying “Subhan Allah,” yet despite that he insists on getting up for the extra rak‘ah, what is the ruling on that? What should those who are praying behind him do after he gets up?
Praise be to Allah.What is required of the congregation is to alert the imam. The Prophet (blessings and peace of Allah be upon him) said: “Whoever notices something amiss during the prayer, let the men say ‘Subhan Allah’ and let the women clap.” And what is required of the imam, if they alert him, is to go back, unless he believes that he is right and they are wrong. In that case, he should do what he himself believes is right and continue until he completes the prayer, according to what he believes is the case. If those who alerted him are certain that he is wrong and is making a mistake, they should not get up with him; rather they should remain seated, reciting at-tahiyyat, sending blessings on the Prophet (blessings and peace of Allah be upon him) and offering supplication, waiting for him until they say the salaam with him. That is because he is excused and they are excused; they are excused because they believed that he was making a mistake, and he is excused because he believed that he was right and they were mistaken. Hence each of them is excused because of his ijtihad and being certain, as each of them thinks he was right. Then when the imam says the salaam, they should say the salaam with him.
But if the imam is not certain, then what he must do is go back, if two or more people alerted him. In that case, if he is not certain and only thought that he was right, he should go back. He should go back as the Prophet (blessings and peace of Allah be upon him) did on the day when Dhu’l-Yadayn alerted him [to a mistake in the prayer]. He asked the people, and they said that Dhu’l-Yadayn was right, so the Prophet (blessings and peace of Allah be upon him) went back and completed the prayer. He did not act immediately on what Dhu’l-Yadayn said, because he was one person, and it is not obligatory to accept the view of one person in this regard, unless the imam believes that he is right, in which case he should go back. But if two people alert him, then he should accept what they say and act on it, and ignore what he thinks is the case; that is obligatory. As for the people praying behind the imam, they should not follow him if he makes a mistake by adding or omitting something. If he is adding a rak‘ah, they should sit and wait until he says the salaam, then say the salaam with him. If he has omitted a rak‘ah and did not pay attention to them, and he sits in the third rak‘ah of Zuhr, for example, or of ‘Isha’ or ‘Asr, or he sits in the first rak‘ah of Fajr or Jumu‘ah, and does not pay any heed to them, then they should stand up and complete their prayer, and differ from him, because they believe that he is making a mistake. End quote.
Shaykh ‘Abd al-‘Aziz ibn Baz (may Allah have mercy on him).
Fatawa Nur ‘ala ad-Darb (2/847).