Does the prohibition of taking revenge (Leviticus 19:18) or bearing a grudge apply to gentiles?
Rambam in Hilchos Deos 7:7&8 says
" Halacha 7 A person who takes revenge against a colleague transgresses a Torah prohibition, as [Leviticus 19:18] states: "Do not take revenge."... Halacha 8 Similarly, anyone who holds a grudge against another Jew violates a Torah prohibition... "
Moznaim in the notes (quoting the words "Similarly, anyone who holds a grudge against another Jew.") Says
" The commentaries question why Rambam mentions "another Jew" in this halacha while in the previous halachah he speaks about "a colleague." The Avodat HaMelech explains that this prohibition has a larger scope. Vengeance is forbidden only against "a colleague" i.e., a peer, a person who is on one's own level, while bearing a grudge against any Jew is forbidden, regardless of his social status. [This interpretation is somewhat problematic for, according to the Rambam, bearing a grudge is only a safeguard against revenge] " (As we see later in this Halachah "As long as he brings the matter to mind and remembers it, there is the possibility that he will seek revenge. Therefore, the Torah condemned holding a grudge, [requiring] one to wipe the wrong from his heart entirely, without remembering it at all.")
So now it seems that according to the Avodat HaMelech explaining the Rambam that Vengeance is forbidden only against "a colleague" i.e., a peer, a person who is on one's own level. But a grudge is against any Jew.