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, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
This statement is incorrect. Regarding what you called the “spiritual role” of the Muslim ruler, he is entitled to appoint someone else to lead the prayers in his presence. This is evidenced by the hadeeth in which Abu Mas‘ood Al-Badri, may Allah be pleased with him, narrated that the Prophet, sallallahu ‘alayhi wa sallam, said, “No man should lead another man in prayer in the latter's house, exercise authority where the latter has authority, or sit in his place of honor without his permission.” [Abu Daawood]
Ar-Raafi‘i wrote, “If he gives permission, then there is no harm in that. The hierarchy of authority should be taken into consideration; the supreme Imaam (Caliph) has a higher authority, and then the governors and so on...” [Ash-Sharh Al-Kabeer] This means that this matter is contingent upon the permission of the Muslim ruler, and not his presence or absence.
The Muslim scholars underlined that it is allowed for the regular imaam to appoint someone else to lead the prayers regardless of whether the mosque was built by the state or by the people of the neighborhood; however, in case of a civil mosque, the imaam must seek the permission of the worshipers before appointing someone else to lead them in prayer.
Ar-Rawdh Al-Murbi’ reads:.
“Al-Ghaayah (a Hanbali book) reads: No one should lead the prayer in the big mosques, except the imaams appointed by the ruler or his deputy. If the appointed imaam is absent, then he is entitled to appoint someone else to lead the prayer.
As for the local mosques that are built by the people of any given community or tribe, they are entitled to appoint whomever they wish to lead them in the prayer. If it is not possible for them to agree on an imaam, then the village chief is entitled to appoint someone to lead them and those people are not entitled to remove him after accepting him unless his condition changes (negatively). If this imaam is absent for any reason, he has no right to appoint someone else to lead the prayer. Al-Haarithi said that the most famous scholarly view in this regard is that this imaam has the right to appoint someone to lead the prayers in this case as well; however, he should not be appoint anyone except with the approval of the people of the neighborhood...”
As for the administrative role, the ruler is entitled to appoint someone else to carry out certain tasks and duties even in his presence. An example of this is what is called “the ministry of authorization” (in which the minister is authorized to look into everything that the Caliph looks into; the Caliph is the principle authority and the minister is his deputy). There is also “the ministry of execution” (in which a minister is the executor of the Caliph's order, and he is not entitled to look into matters as is the case with the ministry of authorization). The ruler also appoints the governors to carry out his orders and address the affairs of the people in the different parts of the Muslim state on his behalf, as well as the military commanders, the leaders of Hajj, and the like.
Allah knows best.