He ﷺ said, “even if it is only a single sheep,” that is, even if the food offered is modest; and for ʿAbd al-Raḥmān ibn ʿAwf—who was a man of means—a single sheep counted as very little.
His statement ﷺ, “Whoever does not respond has disobeyed Allah and His Messenger,” shows that accepting the invitation to a walīmah is obligatory, for a person is not described as disobedient for neglecting something unless that act is required. Still, the obligation is conditioned by several factors:
Condition 1: the host must be a Muslim. If he is not, responding is not mandatory, though it is permissible—especially when some benefit is hoped for. Thus, if a non-Muslim invites you to a wedding banquet there is no harm in attending, particularly if this might draw him closer to Islam. It is authentically reported that a Jew in Madinah once invited the Prophet ﷺ; he accepted and the man served him barley bread and rancid fat—meaning old, spoiled lard.
Requiring the host to be upright and morally sound is not a condition. One may accept the invitation of an open sinner: someone who seldom prays in congregation, or shaves his beard, or smokes. Answer him just as you would anyone free of those faults.
However, if declining the invitation would serve a greater benefit—such that the host feels ashamed and abandons the sin he is accustomed to because people no longer attend his gatherings—then attending is no longer obligatory for that host’s own good. But if he gains nothing whether you accept or decline