Riyad Us-Saliheen (Gardens of the Righteous)
What should one say to the Host if an uninvited Person is accompanied with an invited Person
739. Abu Mas`ud Al-Badri (May Allah be pleased with him) reported: A man prepared some food especially for the Prophet (PBUH) and invited him along with four others. But a man accompanied him. Having arrived at the door, Messenger of Allah (PBUH) said to the host, "This person has followed us. You may allow him, if you like, and if you like he will return.'' He said: "O Messenger of Allah, I allow him, too.''
[Al-Bukhari and Muslim].
Commentary: It will be considered an expression of bad manners if somebody participates in a feast as an uninvited, parasitic guest. Yet, he stands a chance in case he is allowed by the host. In this Hadith, there is a case when Messenger of Allah (PBUH) said to the host that it was up to him to let the uninvited person to stay for food or go. However, the invitees may take along with them two or three uninvited guests if they believe that the host will not take it ill.