am (ayin mem) is translated as either nation or generic people depending on the context and in this context both apply. Am haaretz the context is generic peoplehood, am cohanim refers to nationality .also virtually all nations have ways to incorporate an alien be it citiazenship test or Halachic coversion mit a beis din.
I don't have a concordance here, but I wonder whether a search of the Torah's use of the word "am" would show it used to refer to any other nations (am prizi, am hitti, etc.)