Praise be to Allah.
Allah, may He be exalted, says (interpretation of the meaning):
“Your ally is none but Allah and [therefore] His Messenger and those who have believed - those who establish prayer and give zakah, and they bow [in worship]”
The word waliy [translated here as ally] means a lover, friend and supporter. This is indicated by the linguistic meaning and the context of the verse.
As for the linguistic meaning, it says in al-Qaamoos al-Muheet (p. 1344):
Al-walyu means closeness, nearness…
Al-waliy is a noun derived from this root; it also means a lover, friend or supporter. End quote.
As for the context of the verse, the preceding verses forbid taking the Jews and Christians as allies (or close friends), as Allah, may He be exalted, says (interpretation of the meaning):
“O you who have believed, do not take the Jews and the Christians as allies. They are [in fact] allies of one another. And whoever is an ally to them among you - then indeed, he is [one] of them. Indeed, Allah guides not the wrongdoing people.
So you see those in whose hearts is disease hastening into [association with] them, saying, ‘We are afraid a misfortune may strike us.’ But perhaps Allah will bring conquest or a decision from Him, and they will become, over what they have been concealing within themselves, regretful.
And those who believe will say, ‘Are these the ones who swore by Allah their strongest oaths that indeed they were with you?’ Their deeds have become worthless, and they have become losers”
Ibn ‘Atiyyah (may Allah have mercy on him) said: The words “Your ally is none but Allah” are addressed to the same people as those to whom it was said [in v. 51], “do not take the Jews and the Christians as allies”.
End quote. Al-Muharrar al-Wajeez (2/208).
What is prohibited is taking them as allies; in other words, it is prohibited to take them as supporters and friends, and to love them, as Allah, may He be exalted, says elsewhere (interpretation of the meaning):
“You will not find a people who believe in Allah and the Last Day having affection for those who oppose Allah and His Messenger, even if they were their fathers or their sons or their brothers or their kindred. Those - He has decreed within their hearts faith and supported them with spirit from Him. And We will admit them to gardens beneath which rivers flow, wherein they abide eternally. Allah is pleased with them, and they are pleased with Him - those are the party of Allah. Unquestionably, the party of Allah - they are the successful”
The meaning does not make sense if it is understood as meaning that it is not allowed to seek their help to bring benefit or ward off harm. No rational person could understand it in this manner.
The point is that the context of the verse indicates that being an ally here is meant in the sense of love, friendship and support. The leading scholars of tafseer stated this.
At-Tabari (may Allah have mercy on him) said:
What Allah, may He be exalted, meant in the verse “Your ally is none but Allah and [therefore] His Messenger and those who have believed” is: O believers, you have no supporter or helper except Allah and His Messenger, and the believers whose description is as Allah, may He be exalted, stated. As for the Jews and Christians with whom Allah has instructed you to disavow any alliance, and has forbidden you to take allies from among them, they are not allies or supporters for you; rather they are allies of one another, so do not take any ally or supporter from among them.
End quote from Tafseer at-Tabari (8/529).
For this person to suggest that the word wali (ally) in this verse is referring to some specific individuals who were known for their righteousness, such as Shaykh ‘Abd al-Qaadir al-Jilani, this is limiting the meaning of the verse without any evidence to support doing so, and it is speaking about Allah without knowledge, because the verse states that the wali from among the believers is anyone who establishes prayer, keeps up with it and gives zakaah, as Allah, may He be exalted, says: “and those who have believed - those who establish prayer and give zakah, and they bow [in worship]”.
Al-Qurtubi (may Allah have mercy on him) said:
The word alladheena (“those who”) is general in meaning and applies to all believers. Abu Ja‘far Muhammad ibn ‘Ali ibn al-Husayn ibn ‘Ali ibn Abi Taalib (may Allah be pleased with him) was asked about the meaning of the verse “Your ally is none but Allah and [therefore] His Messenger and those who have believed” – did it refer to ‘Ali ibn Abi Taalib? He said: ‘Ali was one of the believers, which means that this refers to all the believers. An-Nahhaas said: This is obvious, because the word alladheena (“those who”) is plural.
End quote from Tafseer al-Qurtubi (8/54).
Moreover, this person’s interpretation is also one that contains elements of shirk (association of others with Allah); the texts of the Qur’an and Sunnah, as well as the Islamic beliefs affirmed by all Muslims, prove that this interpretation is wrong, for harm and benefit are all in the hand of Allah, may He be exalted, and we should not seek benefit or the warding off of harm except from Allah, may He be exalted, alone.
As Allah, may He be exalted, said, addressing His Prophet (blessings and peace of Allah be upon him):
“Say, ‘I hold not for myself [the power of] benefit or harm, except what Allah has willed. And if I knew the unseen, I could have acquired much wealth, and no harm would have touched me. I am not except a warner and a bringer of good tidings to a people who believe’”
Abu Hayyaan al-Andalusi (may Allah have mercy on him) said:
These words on the part of the Prophet (blessings and peace of Allah be upon him) show that he is a slave of Allah, and rule out his having any of the unique attributes of Lordship, such as power and knowledge of the unseen. It is demonstrating complete surrender, by saying: I have no power to bring benefit for myself or to ward off harm from myself, so how could I have knowledge of the unseen? As Allah says in Soorat Yoonus (interpretation of the meaning):
“And they say, ‘When is [the fulfilment of] this promise, if you should be truthful?’
Say, ‘I possess not for myself any harm or benefit except what Allah should will. For every nation is a [specified] term’”
End quote from al-Bahr al-Muheet (4/552).
Allah, may He be exalted, says (interpretation of the meaning):
“And that when the Servant of Allah stood up supplicating Him, they almost became about him a compacted mass.
Say, [O Muhammad], ‘I only invoke my Lord and do not associate with Him anyone.’
Say, ‘Indeed, I do not possess for you [the power of] harm or right direction.’
Say, ‘Indeed, there will never protect me from Allah anyone [if I should disobey], nor will I find in other than Him a refuge.
But [I have for you] only notification from Allah, and His messages.’ And whoever disobeys Allah and His Messenger - then indeed, for him is the fire of Hell; they will abide therein forever.
[The disbelievers continue] until, when they see that which they are promised, then they will know who is weaker in helpers and less in number.
Say, ‘I do not know if what you are promised is near or if my Lord will grant for it a [long] period.’
[He is] Knower of the unseen, and He does not disclose His [knowledge of the] unseen to anyone
Except whom He has approved of messengers, and indeed, He sends before each messenger and behind him observers
That he may know that they have conveyed the messages of their Lord; and He has encompassed whatever is with them and has enumerated all things in number”
Shaykh ‘Abd ar-Rahmaan as-Sa‘di (may Allah have mercy on him) said:
“Say, ‘Indeed, I do not possess for you [the power of] harm or right direction’” – for am a slave of Allah, and I have no power or control over anything.
“Say, ‘Indeed, there will never protect me from Allah anyone [if I should Disobey]” – there is no one whose protection I could seek to save me from the punishment of Allah.
If the Messenger, who is the most perfect of creation, has no power of harm or right direction, and cannot protect himself at all from Allah, If he intends ill for him, then it is more appropriate that this should apply to all other people.
End quote from Tafseer as-Sa‘di (891).
And Allah knows best.