It’s a Tannaic dispute whether non-Jews are prohibited in witchcraft. According to Sanhedrin 56a-b:
- The Tanna Kamma holds only the basic seven are obligatory upon them.
- R’ Chananya Ben Gamla adds blood from a living animal.
- R’ Chidka adds castration.
- R’ Shimon adds witchcraft, and R’ Yosi adds that all forms of witchcraft mentioned in that passage are forbidden.
- R’ Eliezer adds certain forms of mixtures.
And more opinions further down on that page:
- Academy of Menashe: The seven are idolatry, forbidden relations, murder, theft, eating a limb from a live animal, castration, and forbidden mixtures.
- R’ Yehuda: Only idolatry
- R’ Yehuda Ben Beseira: Also blaspheming
- “Some say”: Also proper justice
As you can see, from among all of these opinions, only R’ Shimon and R' Yosi hold that non-Jews are forbidden in witchcraft. The Gemara later (60a) discusses R’ Shimon’s source:
ר"ש אומר אף על הכישוף: מ"ט דר"ש דכתיב (שמות כב, יז) מכשפה לא תחיה וכתיב (שמות כב, יח) כל שוכב עם בהמה מות יומת כל שישנו בכלל כל שוכב עם בהמה ישנו בכלל מכשפה לא תחיה:
R’ Shimon says: also on witchcraft. What’s the reason for R’ Shimon? As it is written, “A witch shall not live,” and it is written [in the immediately following verse], “Whoever lies with an animal will be killed.” Whoever is obligated in bestiality is also obligated in witchcraft.
The Gemara does not explain why the other opinions reject this source.
When the Rambam discusses the halachos of non-Jews in Melachim ch. 9-10, he only discusses the laws of the basic seven, plus a few others which the Gemara says are subsets of them. This implies that in practice we do not hold that witchcraft is prohibited for non-Jews, and they are allowed to practice witchcraft as they wish.