All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Yes, it is confirmed in the Sunnah that it is permissible to carry (hold) children while praying when there is a need. Imaams Al-Bukhari and Muslim reported that the Prophet used to pray while carrying his granddaughter Umamah Bint Zaynab, daughter of his daughter Zeynab and Abu Al-'Aass . When he stood up he held her, and when he prostrated he put her on the floor." So some scholars are of the view that this is permissible in general whether in obligatory prayers or supererogatory prayers, and whether a person is leading the prayer, being led in prayer or praying individually.
Allaah knows best.