Short answer
At first, no. The Buddha says that after his awakening he thought teaching would be wearying and troublesome, and his mind inclined not to teach. A god named Sahampati cried that the world would be lost and begged him to teach. Only then did he agree. He also says the verses that came to him then were not inspired from above. Near his death he told Ananda, his attendant, that he could live on if he wished. Ananda did not ask him to stay. When Mara, the Wicked One, urged him to pass away, he set his death three months ahead. Later he told Ananda the fault was his alone. So the Buddha was not sent with a message: he chose whether to teach, and nearly chose not to. The Qur'an describes a messenger God (﷾) commanded to rise and warn. It grieved him that his people should perish.
Full explanation
Teaching would be troublesome
The Buddha says that after his awakening he thought: what I have found is deep and hard to see, and people love to cling to things. If I taught it and others did not understand, it would be tiring and troublesome for me. Some verses came to him that were, he says, neither given from above nor learned before. So his mind leaned towards staying silent, not towards teaching.
“Then it occurred to me, 'This principle I have discovered is deep, hard to see, hard to understand, peaceful, sublime, beyond the scope of logic, subtle, comprehensible to the astute. But people like clinging, they love it and enjoy it. It's hard for them to see this topic; that is, specific conditionality, dependent origination. It's also hard for them to see this topic; that is, the stilling of all activities, the letting go of all attachments, the ending of craving, fading away, cessation, extinguishment. And if I were to teach this principle, others might not understand me, which would be wearying and troublesome for me.'”
“And then these verses, which were neither supernaturally inspired, nor learned before in the past, occurred to me:”
“So, as I reflected like this, my mind inclined to remaining passive, not to teaching the Dhamma.”
A god pleads with him
A divine being named Sahampati knew what he was thinking. He cried out that the world would be lost and would perish. He appeared before the Buddha with his palms pressed together, and begged him to teach. Then, the Buddha says, he looked over the world with compassion. He saw beings who could understand, and agreed.
“Then the divinity Sahampati, knowing my train of thought, thought, 'Oh lord! The world will be lost, the world will perish! For the mind of the Realized One, the perfected one, the fully awakened Buddha, inclines to remaining passive, not to teaching the Dhamma.' Then, as easily as a strong person would extend or contract their arm, the divinity Sahampati vanished from the realm of divinity and reappeared in front of me. He arranged his robe over one shoulder, raised his cupped palms toward me, and said, 'Sir, let the Blessed One teach the Dhamma! Let the Holy One teach the Dhamma!”
“Then, understanding the Divinity's invitation, I surveyed the world with the eye of a Buddha, because of my compassion for sentient beings.”
The hint Ananda missed
Three months before his death, the Buddha told Ananda that he had the powers to live out a full lifespan, if he wished. The text says Ananda did not take the hint, and did not beg him to stay. His mind was as if taken over by Mara, the tempter in Buddhist scripture.
“The Realized One has developed and cultivated the four bases of psychic power, made them a vehicle and a basis, kept them up, consolidated them, and properly implemented them. If he wished, the Realized One could live for the proper lifespan or what's left of it.”
“But Ānanda didn't get it, even though the Buddha dropped such an obvious hint, such a clear sign. He didn't beg the Buddha: "Sir, may the Blessed One please remain for the proper lifespan! May the Holy One please remain for the proper lifespan! That would be for the welfare and happiness of the people, out of sympathy for the world, for the benefit, welfare, and happiness of gods and humans." For his mind was as if possessed by Māra.”
Mara's request, and Ananda's fault
Then Mara, the Wicked One, came and urged the Buddha to pass away now. The Buddha answered that he would pass away in three months' time, and gave up his life force. Later, Ananda begged him to stay. The Buddha told him the wrong and the mistake were his alone. If he had asked, the Buddha would have agreed the third time.
“When this was said, the Buddha said to Māra, "Relax, Wicked One. The full extinguishment of the Realized One will be soon. Three months from now the Realized One will be fully extinguished."”
“So at the Cāpāla Shrine the Buddha, mindful and aware, surrendered the life force.”
“Therefore, Ānanda, the misdeed is yours alone, the mistake is yours alone. For even though the Realized One dropped such an obvious hint, such a clear sign, you didn't beg me to remain for the proper lifespan, or what's left of it. If you had begged me, I would have turned you down twice, but consented on the third time. Therefore, Ānanda, the misdeed is yours alone, the mistake is yours alone.”
A teaching that depended on others
In these discourses, the teaching begins because a god pleads. And the teacher's life ends at a time set in answer to Mara, with the blame put on a disciple who failed to ask. In these discourses the Buddha does not say he was sent. He says the verses that came to him were not given from above.
“Then the divinity Sahampati, knowing my train of thought, thought, 'Oh lord! The world will be lost, the world will perish! For the mind of the Realized One, the perfected one, the fully awakened Buddha, inclines to remaining passive, not to teaching the Dhamma.' Then, as easily as a strong person would extend or contract their arm, the divinity Sahampati vanished from the realm of divinity and reappeared in front of me. He arranged his robe over one shoulder, raised his cupped palms toward me, and said, 'Sir, let the Blessed One teach the Dhamma! Let the Holy One teach the Dhamma!”
“And then these verses, which were neither supernaturally inspired, nor learned before in the past, occurred to me:”
“When this was said, the Buddha said to Māra, "Relax, Wicked One. The full extinguishment of the Realized One will be soon. Three months from now the Realized One will be fully extinguished."”
“Therefore, Ānanda, the misdeed is yours alone, the mistake is yours alone. For even though the Realized One dropped such an obvious hint, such a clear sign, you didn't beg me to remain for the proper lifespan, or what's left of it. If you had begged me, I would have turned you down twice, but consented on the third time. Therefore, Ānanda, the misdeed is yours alone, the mistake is yours alone.”
A messenger who is sent
The Qur'an tells the Prophet (ﷺ) to rise up and warn, and to proclaim what has been sent down to him. If he does not, it says, he has not delivered God's (﷾) message. It says it grieved him that people should perish, and that he almost wore himself out with grief when they would not believe. His death, like every soul's, came by God's (﷾) permission, at a set time.
“O thou wrapped up (in the mantle)! Arise and deliver thy warning!”
“O Messenger! proclaim the (message) which hath been sent to thee from thy Lord. If thou didst not, thou wouldst not have fulfilled and proclaimed His mission. And Allah will defend thee from men (who mean mischief). For Allah guideth not those who reject Faith.”
“Now hath come unto you a Messenger from amongst yourselves: it grieves him that ye should perish: ardently anxious is he over you: to the Believers is he most kind and merciful.”
“Thou wouldst only, perchance, fret thyself to death, following after them, in grief, if they believe not in this Message.”
“Nor can a soul die except by Allah's leave, the term being fixed as by writing. If any do desire a reward in this life, We shall give it to him; and if any do desire a reward in the Hereafter, We shall give it to him. And swiftly shall We reward those that (serve us with) gratitude.”
The usual answers
Sahih al-Bukhari 3 — Kitab Bad' al-Wahy (How the Divine Revelation Started), hadith 3
Aisha describes the first revelation. In the cave of Hira the angel told the Prophet (ﷺ) to read, and three times he answered that he could not read, before the first verses of Surat al-Alaq were given to him. Khadija took him to her cousin Waraqa ibn Nawfal, an old, blind man who had become a Christian and wrote out parts of the Gospel in Hebrew letters. Waraqa said this was the angel God had sent to Moses, and a few days later he died.
Cited for
Muhammad (ﷺ) hesitated too. At the first revelation in the cave of Hira he said he could not read.
The response
He told the angel he could not read. He did not decline to teach because it would be troublesome. The Qur'an then commanded him to rise and warn, and it grieved him that people should perish. The Buddha gives his own reason for holding back: teaching would be wearying and troublesome for him.
Where it lands — A prophet who could not read is not a teacher who did not wish to teach.
Perspectives
Buddhist replies
The Buddha hesitated only because the teaching is deep, and he chose to teach out of compassion. His passing was his own mindful choice.
The Buddha hesitated because the teaching is deep and hard to see. In the end, he taught out of compassion for all beings.
Rebuttal
He gives his own reason: teaching would be wearying and troublesome for him. It took a god crying that the world would be lost to turn him. A messenger of God (﷾) does not choose whether to deliver. The Qur'an commands him to rise and warn, and it grieved him that people should perish.
The Buddha's passing was his own choice, made mindfully. It shows his mastery over life and death.
Rebuttal
The choice was made in answer to Mara's urging. Then the Buddha blamed Ananda for not begging him to stay. In Islam, no soul dies except by God's (﷾) permission, at a time He has set.
The Islamic perspective
The Pali texts show a teacher who chose whether to teach, and began because a god pleaded. He set the time of his death in answer to Mara. The Qur'an shows a messenger sent and commanded by God (﷾), who grieved for those who would not believe.
The Buddha says teaching would have been tiring and troublesome for him, and his mind leaned towards not teaching. Then a god named Sahampati begged him to teach.
The Buddha told Mara he would pass away in three months. Then he told Ananda the fault was his alone, for not begging him to stay.
The Qur'an commands the Prophet (ﷺ) to rise up and warn, and to proclaim what was sent down to him. And it says it grieved him that people should perish.