It is unwise to take verses out of context. The prophet Ezekiel was told by God to warn Israel because they had become unfaithful to God in a spiritual sense. Here, prostitution is likened to the unfaithfulness of Israel. Just as God condemns prostitution, so God condemns idolatry and turning to false gods. You ask if the words spoken by Ezekiel the words given to him by God. Yes.
“And you shall speak my words to them, whether they hear or refuse to hear, for they are a rebellious house” (Ezekiel 2:7).
Did Ezekiel flinch from delivering the words of condemnation and judgment God told him to deliver to the rebellious and idolatrous nation? No, because God had laid this command upon him:
“If I say to the wicked, O wicked one, you shall surely die, and you do not speak to warn the wicked to turn from his way, that wicked person shall die in his iniquity, but his blood I will require at your hand. But if you warn the wicked to turn from his way, and he does not turn from his way, that person shall die in his iniquity, but you will have delivered your soul” (Ezekiel 33:8-9).
Does God ever flinch from speaking strong words? Does God pretend that human behaviour can be “swept under the carpet” and ignored just because it is unpleasant? No. Throughout the Bible God speaks through his prophets to condemn immorality – whether it is physical or spiritual. The Bible is full of warnings against prostitution. The Bible tells us that prostitution is immoral.
"For a prostitute is a deep pit and a wayward wife is a narrow well. Like a bandit she lies in wait, and multiplies the unfaithful among men" (Proverbs 23:27-28)
God forbids involvement with prostitutes because He knows such involvement is detrimental to both men and women.
For the lips of an immoral woman drip honey, and her mouth is smoother than oil; But in the end she is bitter as wormwood, Sharp as a two-edged sword. Her feet go down to death, her steps lay hold of hell" (Proverbs 5:3-5 NKJV).
Prostitution not only destroys marriages, families, and lives, but it destroys the spirit and soul in a way that leads to physical and spiritual death. God’s desire is that we stay pure and use our bodies as tools for His use and glory (Romans 6:13).
Did Ezekiel speak the words of God? Yes. God hates immorality, prostitution and idolatry. Strong language was required to warn Israel of the dangerous path they were on. That is why their unfaithfulness to God was likened to prostitution – and unless they heeded God’s warnings, their conduct would be punished.
God does not hesitate to expose sinful behaviour and condemn it. Those verses in Ezekiel liken the sinful conduct of Israel to that of a prostitute. Context is everything.
Just one final point that needs to be made here – Ezekiel was not speaking the words of Allah. Ezekiel was speaking the words of Yahweh.