In the Name of Allah, the All-Merciful, the Mercy-Giving
All praise is due to Allah. Peace and blessings be upon His Messenger Muhammad.
According to a group of scholars, the one who abandoned regular performance of prayer is regarded a kafir. A righteous deed does not avail any benefit for him. According to the Quran, “It is not for the Prophet and those who have believed to ask forgiveness for the polytheists, even if they were relatives, after it has become clear to them that they are companions of Hellfire.” (At-Tawbah 9:113)
There is a possibility that such a person offered prayers on some occasions. Based on this there is a possibility that he is a Muslim according this group of scholars. Therefore, you can offer hajj on his behalf provided that he is a Muslim. There is no problem of putting a condition when one intends to perform certain acts of worship.
This is based on the hadith of A’ishah (may Allah be pleased with her) who narrated, ‘The Messenger of Allah (peace be upon him) went to visit Duba’ah bint Az-Zubair bin ‘Abdul Muttalib. She said to him, ‘O Messenger of Allah I have made the intention to perform Hajj but I am suffering from an illness.’ He said to her, “Perform Hajj but set a condition that you shall be relieved of the Ihram whenever you are prevented (due to illness, etc.).” (Al-Bukhari and Muslim)
Almighty Allah knows best.
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.