There was a family from the Ansar known as the family of Amr bin Hazm who used to perform incantations to treat scorpion stings. The Messenger of Allah ﷺ had forbidden incantations, so they came to him and said, "Messenger of Allah, you have forbidden incantations, but we use them to treat scorpion stings."He said to them, "Recite them to me."So they recited them to him, and he said, "There is no harm in these. These are binding pledges."
حدثنا علي بن أبي الخصيب حدثنا يحيى بن عيسى عن الأعمش عن أبي سفيان
كان أهل بيت من الأنصار يقال لهم آل عمرو بن حزم يرقون من الحمة وكان رسول الله ﷺ قد نهى عن الرقى فأتوه فقالوا يا رسول الله إنك قد نهيت عن الرقى وإنا نرقي من الحمة فقال لهم اعرضوا علي فعرضوها عليه فقال لا بأس بهذه هذه مواثيق
No references are available.
Muslim narrated it in "The Book of Greetings," in the chapter on the desirability of ruqya for the evil eye, ants (a type of sore), poisonous stings, and the evil glance, hadith no. 63/2199, from the hadith of Amash, through this same chain.