Is there a verse in the Quran stating that if people loved someone or something more than they love Allah, Allah would be their rivals?

The Answer:
Yet there are men who take (for worship) others besides Allah, as equal (with Allah); they love them as they should love Allah. But those of faith are overflowing in their love for Allah. If only the unrighteous could see, behold, they would see the Punishment: that to Allah belongs all power, and Allah will strongly enforce the Punishment!" (al-Baqarai, 2/165)
This verse shows that one of the most important characteristics of divinity is love, that is, to be loved. Therefore, in the terminology of the Quran, man is usually mentioned as “slave”. Being a slave expresses the highest degree of love felt toward the being for whom one is a slave. The verse shows that a person who loves something or someone as much as one loves Allah is regarded to have associated partners with Allah. It means to have associated partners in love not in creation or divinity. Al-Wadud is one of the beautiful names of Allah; it means “the being that loves His creatures very much and that is loved by them very much”.
Although the oneness and power of Allah is clear due to so many actual and oral signs, some people associate partners with Him and love those partners as the love Allah. They obey their orders, prohibitions and wishes and they disobey Allah.
Doubtlessly, acting like that means associating partners with Allah in terms of divinity whether by denying His existence or not. Some of them commit this polytheism openly. They never avoid calling the Pharaohs and Nimrods as gods. They address them as “our Lord, our God”. They even accept the view that gods are born and give birth, attributing sons and daughters of the same kind to them like deities. Others do the same thing secretly. They love them as they love Allah and accept them as the owner of the bounties. They accept their love as the beginning point of their acts. They do to them what is necessary to do to Allah. They try to reach their consent without thinking of the consent of Allah. They obey them even regarding things that necessitate disobedience to Allah.
The verse shows us that ultimate love is essential for divinity. A deity is the being that is loved in the highest degree. Things that are loved so much are regarded to have been loved like deities. The indication of love is obedience. Therefore, a person obeys the deity fully. The beginning point of the movement of a person on the way he follows is his deity. There are so many things that are loved by people and regarded as a deity and equal to Allah: a stone, a piece of metal, a plant, celestial bodies, spirits, angels, etc. However, in the expression “they love them”, the pronoun they denote sane people clearly.
Therefore, tafsir scholars explained the word “andad” (equivalents) as their leaders, chiefs and notables that they obey while disobeying Allah. Even if that pronoun is regarded as including other idols, this meaning is clear.
Indeed, there are so many people who love beautiful people, heroes and rulers that are regarded as a hope for wealth, grandeur, strength, post, prestige and beauty as they love Allah and risk everything for their sake; it is the fundamental of the polytheism and the greatest wound of the humanity.
They know neither Allah nor prophets. They always have the love of one or more creatures in their heart. They love them as they should love Allah and regard them as deities. They disobey Allah in order to obey them. The expression, “they love them as they should love Allah” describes them. The people who regard saints and prophets as a deity are also included in that description.
Therefore, when a person loves the saints, prophets and angels of Allah, he needs to consider the content of the verse very well; he needs to avoid loving them as he should love Allah. It is necessary to know the difference between loving for Allah and loving as one should love Allah. Those who love Allah love His beloved servants that are in the way of Allah. However, they love them for the sake of Allah not as they should love Allah; they follow them in the way of Allah with this love.
Say: ‘If ye do love Allah, follow me: Allah will love you and forgive you your sins.’" (Aal-i Imran, 3/31).
Accordingly, it is not a sin and polytheism to love the people that Allah loves and to follow them. On the contrary, it is proof for the love of Allah. However, this love must never be like the love of Allah. That is, it must not be like the love of Christians for Jesus, regarding him as a deity. The best example to it is found in kalima ash-shahada, which is the key to Islam and belief, and in prayer (salah), which is the primary worship in Islam. When a Muslim says, “I witness that there is no god but Allah and I witness that Muhammad is His slave and Messenger”, he rejects all of the deities except Allah; he confirms the loyalty of the Prophet Muhammad (pbuh) to Him as a slave and prophet with his clean heart; and he presents his witnessing this truth for Allah. In this witnessing, there exists a declaration of love for the Prophet after Allah. Belief becomes complete through this love. However, love of Allah is related to the oneness of the Lord and love of Hazrat Muhammad (pbuh) is related to his servitude to Allah and his prophethood. It is the greatest example of loving for Allah!
However, there also exists a part of this deviation that develops and spreads through philosophy under the name of science and knowledge. It is definitely more important. We do not find it necessary to mention the wrong and abandoned philosophies and atheism that deny the existence of Allah. There is no need to mention various aspects of the evil of the atheistic philosophies that are equal to and even worse than the deepest ignorance; besides, they have no siginificance in terms of science and philosophy. However, there is a secret atheistic philosophy that is disguised under the name of the philosophy of divinity and wahda al-wujud (oneness of existence), which has caused the greatest damage to the religion and ethics in terms of science and wisdom. Polytheism, no matter where it is, is somewhat related to this kind of atheism.
(Elmalılı Tefsiri, İlgili ayetin açıklaması)