Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates: We were with the Prophet (peace and blessings be upon him) when (the body of) a man was brought so that he would offer the funeral prayer for him. The Prophet (peace and blessings be upon him) asked: "Is there any debt owed by your companion?" The people said: "Yes." The Prophet (peace and blessings be upon him) said: "What benefit will it be to you that I lead the funeral prayer of a man whose soul is held in pledge in his grave? His soul will not ascend to the heavens. If someone becomes a guarantor for his debt, then I will lead his funeral prayer, and in that case my prayer will benefit him."
Imam Tabarani recorded it in al-Mu'jam al-Awsat. Its chain contains a narrator, Abd al-Hamid bin Umayyah, and he is da'if (weak).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الجنائز / 4212