I remember a professor talking about how there were a number of times in the Iliad in which the Greeks demonstrated that they shared the same religion. He talked about this a lot in class. I remember this being connected to Apollo, but I don't remember exactly how or where in the Iliad. I think one instance of this happened at the beginning, probably something to do with Chryseis. How would a person show that they too worshiped Apollo, that they upheld xenia, and were not barbarians but were people of the same culture?
I can't answer for exactly what your prof was saying, but it is certainly true that Apollo is a major figure in Trojan religion within the Iliad. He had a cult-site at a place near Troy called Thymbre or Thymbrai, which is mentioned once in the Iliad (10.430) and plays a major role in non-Iliadic accounts of the Trojan legend; he's the mainstay of the divine aid given to the Trojans; it's his priest Chryses who starts off the plot because the Greeks kidnapped and raped his daughter.
(As an aside, Apollo genuinely was an important figure in historical Trojan cult, too, in the late Bronze Age: he's mentioned in one Hittite document relating to Bronze Age Troy, and there's a fragment of a Luvian poem that makes it clear he's a plague god, just as he is in Iliad book 1.)
"How would a person show that they too worshiped Apollo"? There's no secret handshake, but having a major cult-site devoted to the god would certainly help. This has nothing to do with xenia -- we don't know for sure if xenia was even a real thing in that era. And it hasn't got much to do with not being barbarian. Ancient religion in that part of the world wasn't about showing a membership card for the right club, it's about where you are. If you're in Athens, you're going to be paying your respects to Athena. If you're in Argos, it'll be Hera. At Delphi, Apollo; at Olympia, Zeus; in Elis, Hades; in Cyrene, Ammon, as an African equivalent to Zeus; in Egypt, Egyptian gods; in Tyre, Phoenician gods, and so on and so on.
Of course practically every city had multiple cults going on, but some were always going to be more important than others. In Archaic-period Troy, the big two were Apollo, because of the cult-site at Thymbre, and Athena, because she was the main civic deity of Troy when it was colonised by Aiolian Greeks in the 8th century BCE. Her central role in Trojan religion comes up in book 6 (lines 87-98 and 269-311), but since the Iliad is set in a time before Greek colonisation, Athena refuses to help the Trojans when they pray to her. (There's some major anachronism built into that scene -- is Athena a Trojan goddess or isn't she? The poet wants to have it both ways.)
The nationalist aspect only comes into things with festivals where people come from long distances, like the Olympia, the Delia, and the Panathenaia. In those limited contexts, it can make sense to talk about a "national" religion. People who weren't Greek could and did make offerings at major Greek cult-sites: Herodotos talks about the Lydian king Kroisos sending offerings to major oracles throughout Greece, and we have inscriptions recording "Tyrrhenian" (Etruscan? Roman?) offerings at Delphi at an early date.
Basically, religion has almost nothing to do with being barbarian or otherwise. Language is more important; political ideology mattered too. Religion was more about which geographical space you happened to be occupying at the moment.