The sensitive issue of whether or not Muslims can call upon the Holy Prophet (Peace Be Upon Him) by proclaiming the words 'Ya Rasulullah' needs to be clarified effectively, since this issue divides the Muslim community and causes untold pain and friction among the Muslim communities throughout the world.
There are basically two schools of thought, one that says that calling upon the Holy Prophet (Peace Be Upon Him) is 'shirk' and that any Muslim proclaiming 'Ya Rasulullah' in fact goes outside the pale of Islam and becomes a mushrik. Thus, such a person needs to take the 'shahadah' again in order to became a Muslim or he remains a 'mushrik'.

The following statements make clear the beliefs and ideology of this school of thought:

1. "Most people call out to the spiritual guides, the Prophets, the Imams, the martyrs, the angels, the devils and the fairies in times of distress and ask them to redress their needs. They also give them offerings for this purpose. Thus they indulge in polytheism. (Taqwiyat-ul-Imaan,P5-6, by Ismail Dehelvi)

2. "How can anyone be the redresser of needs, the solver of difficulties and holder of one's hand? People holding such beliefs are out and out polytheist. They cannot even be allowed to get married to Muslims. And those people who are informed about their evil thoughts and even then do not call them 'apostates and polytheist' are polytheists themselves in the same degree. (Jawaahir-ul-Quraan, P147, by Ghulam Khan, Rawalpindi)

3. "He who seeks help from anyone except Allah is, in fact, a thorough polytheist. There is none in the world as bad as he. Curse be upon such a person from all (creatures) in the world." "To ask for fulfillment of ones needs and invoke them (i.e. Prophets & Saints) is the way of the polytheist". (Tazkeer-ul-Akhwaan,P83 &P343, by Ismail Dehelvi).
The above statements belong to the Wahhabi/ Deobandi/ Tabligh Jamaat scholars according to whom it is a great sin to proclaim 'Ya Rasulullah' with the intention that the Holy Prophet (Peace Be Upon Him) can hear such a call for help. Also seeking the 'waseela' (intercession) of the Holy Prophet (Peace Be Upon Him) is deemed as polytheism by this school of thought.
Let us now examine the beliefs of the other school of thought, namely the Ahle Sunnat Wal Jamaat, who believe it is permissible to proclaim 'Ya Rasulullah' according to Islamic Law.

The following proofs have been forwarded by this school of thought in their support:
1. Imam Bukhari (RadiAllah Anhu) in his Kitaabu Adaabul Mufrad has written that Hazrat Adullah ibn Omar (RadiAllah Anhu) once suffered from cramp. Someone advised him to remember the person whom he loved most. The great Companion then proclaimed loudly: "Ya Muhammad", it is recorded that he was immediately relieved of the cramps.

2. Imam Tabraani (RadiAllah Anhu) in his Muh'jam records the following incident: "A person in dire need once visited Ameerul Mu'mineen Hazrat Uthman Ghani (RadiAllah Anhu). The Caliph though, due to other work, did not pay much heed to this man. The person thereafter went to Hazrat Uthman bin Hanif (RadiAllah Anhu) and complained about the matter.

Hazrat Uthman bin Hanif (RadiAllah Anhu) ordered the man to perform Wudhu, enter the Masjid and offer two rakaats of Nafil Salaah, he was then to recite the following Du'a:
"O Allah, I beg of you and I seek your Assistance, with the Waseela of Your Beloved Prophet (Peace Be Upon Him) who is the Prophet of Mercy. O Muhammad!, I turn to Allah with your Waseela so that my needs be fulfilled!. "