Praise be to Allah.
What is tawassul?
Tawassul in Arabic means seeking to draw close. Allah says in the Quran (interpretation of the meaning): [they] desire means of access to their Lord [al-Isra 17:57], i.e., means of drawing close to Him.
Types of tawassul
There are two types of Tawassul ; correct Islamic tawassul and forbidden tawassul.
Correct Islamic tawassul
This means seeking to draw close to Allah through acts of worship which He loves and which please Him; these may be obligatory or encouraged, and may take the form of words, actions or beliefs. Some types are as follows:
1. Seeking to draw close to Allah by means of faith and Tawhid. Allah says (interpretation of the meaning): “Our Lord! We believe in what You have sent down, and we follow the Messenger, so write us down among those who bear witness (to the truth).” [Al ‘Imran 3:53]
Ruling on tawassul
The rulings on Islamically correct tawassul vary according to its type. Some types are wajib, such as seeking to draw close to Allah through His names and attributes and through Tawhid (believing in His absolute Oneness), and some are mustahabb, such as seeking to draw close to Him by virtue of all kinds of righteous deeds.
Tawassul that is bidah and forbidden
This is the attempt to draw close to Allah by means of things that He does not like and that do not please Him, whether they be words, deeds or beliefs. One example of this is trying to draw close to Allah by calling on the dead or people who are absent, asking them for help, and so on. This is a form of major shirk, which goes against Tawhid and means that a person is no longer considered to be a Muslim.
Calling upon Allah, whether it is for a purpose such as asking Him to grant some benefit or to ward off some harm, or as an act of worship to express humility and submission before Him, can only be addressed directly to Allah.
If du’as or prayers are addressed to anything or anyone else, this is shirk. Allah says (interpretation of the meaning): “And your Lord said: Invoke Me (and ask Me for anything), I will respond to your invocation. Verily! Those who scorn My worship [i.e., do not invoke Me and do not believe in My Oneness], they will surely enter Hell in humiliation!” [Ghafir 40:60]
In this verse, Allah explains the punishment of those who arrogantly refuse to call on Allah, whether they call on someone other than Allah or they do not call on Him at all, out of pride and self-admiration, even if they do not call on anyone else.
Allah says (interpretation of the meaning): “Invoke your Lord with humility and in secret.” [al-A'raf 7:55]. Allah commands His slaves to call on Him and not anyone else.
Allah says of the people of Hell (interpretation of the meaning): “[They say:] By Allah, we were truly in a manifest error when we held you (false gods) as equals (in worship) with the Lord of the Worlds.” [al-Shu’ara 26:96-97]
Anything that results in equating something other than Allah with Allah in worship or acts of obedience is shirk, the crime of associating partners with Him. Allah says (interpretation of the meaning): “And who is more astray than one who calls (invokes) besides Allah, such as will not answer him until the Day of Resurrection, and who are (even) unaware of their calls (invocations) to them? And when mankind is gathered (one the Day of Resurrection), they (false deities) will become enemies for them and will deny their worshipping.” [al-Ahqaf 46:5-6]
Allah says (interpretation of the meaning): And whoever invokes (or worships) besides Allah, any other god, of whom he has no proof, then his reckoning is only with his Lord. Surely, al-kafirun (the disbelievers in Allah and in the Oneness of Allah) will not be successful. [al-Muminun 23:117].
Allah states that anyone who calls on anything other than him is taking that thing as a god, as He says (interpretation of the meaning): “And those, whom you invoke or call upon instead of Him, own not even a qitmir (the thin membrane over a date-stone). If you invoke (or call upon) them, they hear not your call, and if (in case) they were to hear, they could not grant it (your request) to you. And on the Day of Resurrection, they will disown your worshipping them. And none can inform you (O Muhammad), like Him Who is the All-Knower (of everything).” [Fatir 35:13-14].
In this verse, Allah explains that He is the only One Who deserves to be called upon, because He, and no one else, is the Sovereign Who is directing everything. Those things that are worshipped cannot hear du’as, let alone respond to the one who invokes them, and even if they were able to hear, they cannot respond, because they do not have the power to either benefit or harm.
The Arab pagans whom the Prophet (peace and blessings of Allah be upon him) was sent to call were disbelievers because of this shirk. They would call upon Allah sincerely at times of difficulty, but they became disbelievers at times of ease and plenty, when they would call on others besides Him. Allah says (interpretation of the meanings):
“And when they embark on a ship, they invoke Allah, making their Faith pure for Him only, but when He brings them safely to land, behold, they give a share of their worship to others.” [al-Ankabut 29:65]
“And when harm touches you upon the sea, those that you call upon besides Him vanish from you except Him (Allah Alone). But when He brings you safely to land, you turn away (from Him).” [al-Isra 17:67]
“…till when you are in the ships and they sail with them with a favourable wind, and they are glad therein, then comes a stormy wind and the waves come to them from all sides, and they think that they are encircled therein, they invoke Allah, making their Faith pure for Him Alone.” [Yunus 10:33]
The shirk of some people nowadays goes even further than the shirk of people in the past, because they direct some acts of worship to something other than Allah, calling upon them and asking them for help even at times of distress; la hawla wa la quwwata illa Billah (there is no strength and no help except in Allah). We ask Allah to keep us safe and sound.
To sum up our response to what your friend mentioned: asking the dead for anything is shirk, and asking the living for anything that no one except Allah is able to do, is also shirk.
And Allah knows best.