Can a person praying alone become an imam during the prayer?
A person praying alone becoming an imam during the prayer, and a wall or the like coming between the followers and the imam, is not harmful to the prayer; rather it is permissible and valid. This is as in the hadith narrated from Aisha (may Allah be pleased with her): the Messenger of Allah ﷺ was praying in his room, and the wall of the room was low. The people saw the body of the Messenger of Allah ﷺ, so:
فقام ناس يصلون بصلاته
they began to pray with his ﷺ prayer (and the same happened on the second night as well).
Likewise, the permissibility of this act is also established by the hadith narrated from Anas (may Allah be pleased with him).
(Shawkani, may Allah have mercy on him) It is known from these hadiths that it is permissible for a person praying alone to become an imam, in voluntary prayers and likewise in other prayers.
(Bukhari, may Allah have mercy on him) Drawing evidence from the first hadith, he established this chapter:
إذا كان بين الإمام وبين القوم حائط او سترة
“When a wall or a screen comes between the imam and the followers (there is no harm).”
And under it he reported that Imam Hasan al-Basri (may Allah have mercy on him) said: “If there is a river between you and the imam, there is still no harm in praying.” And Abu Mijlaz, the Tabi’i (may Allah have mercy on him), said: “If a road or a wall comes between the imam and the follower, he can still follow him, provided he can hear the imam’s takbir; and after this, Imam Bukhari (may Allah have mercy on him) narrated the previously mentioned hadith of Aisha.”