Yes. Foreign nations of a friendly status.
Saluting Foreign Flags
2-5. b. Foreign national flags. (Normally, these are displayed in alphabetical order using the English alphabet).
Chapter 4 (7) Dipping the flag. The U.S. Army Ceremonial flag is an organizational color and is therefore dipped while the U.S. National Anthem, “To the Color,“ or a foreign national anthem is played.AR 840-10 (15 June 2017)
a. The organizational Color salutes (dips) in all military ceremonies while the National Anthem, “To the Color,” or a foreign national anthem is being played, and when rendering honors to the organizational commander or an individual of higher grade including foreign dignitaries of higher grade, but in no other case.TC 3-21.5 (20 January 2012)
Marine Corps, Navy, and Coast Guard
The MCO is not slear as to salutes to foreign national flags and anthems, I can assure you that the all three of these services do render honors to foreign national flags and anthems. I researching more.
Chapter 4, 1. Miscellaneous Flags, 4. …the flag of the foreign nation will be carried by a separate color guard (normally three Marines). This color guard will be preceded by a Marine Corps color guard during the ceremony.MCO 10520.3 (15 May 2019)
Air Force and Space Force
7.35. Salutes by Flags.AFMAN 36-2203 (19 June 2018)
7.35.1. The Air Force departmental flag is an organizational flag and is dipped while the National Anthem, “To the Color,” musical honors for CSAF or higher or a foreign national anthem is played.
2.11. Order or Precedence of Flags
2.11.2. Foreign national flags. Normally, these are displayed in alphabetical order using the English alphabet. When in NATO countries, NATO member country flags are displayed in French alphabetical order.
2.12. At no time will a foreign national flag be dipped.
2.22.8. The Air Force departmental flag is an organizational flag and is dipped while the national anthem, “To The Color,” musical honors for CSAF or higher, or a foreign national anthem is played.AFI 24-1201 (9 June 2017)
Which Anthem is Played First?
Chapter 2 Flag Background[DrillMaster edit] This information is for all locations and all services. When overseas and on base/American soil (Military Cemetery) the US anthem is last. When on foreign soil, the local national anthem is last unless predetermined otherwise.AFPAM 34-1202 (10 January 2013)
2.4.4. The performance of the national anthem of any foreign country will be followed, without pause, by playing the national anthem of the United States. When two or more foreign national anthems are played, the United States national anthem is performed last.
I thought I would throw this in the mix as well. This information is also available here. This is for all bases overseas, no matter what service.
2.13.4. All flags displayed with the United States Flag should be flown at half-staff when the United States Flag is flown at half-staff with the exception of foreign national flags.[DrillMaster edit] It depends on the Status of Forces Agreement with the country. Usually, the foreign national flag is never lowered to half staff/mast if the President has directed the American flag to half or its a standard American observance.AFI 34-1201 (9 June 2017)
We recently participated in the General Pulaski Day (Polish-American) Parade here in the US.
Our JROTC color guard presented both the Polish and US colors. That was not the issue.
Our situation came up with our march unit. I had instructed the unit commander to have them present arms for both anthems.
But when they started to play the Polish national anthem the commander was looking at the US Miltary Marshall of the parade who did not salute for the Polish national anthem. So the commander held back and then did the present arms for our national anthem.
From what I gather yours is an Army JROTC. So, that means AR 600-25, Salutes, Honors, and Visits of Courtesy, is your guidance. You were/are correct. Foreign national anthems of friendly nations are accorded the same honors as our anthem.
About your cadet commander. He received proper instruction from you but made a decision to the contrary in the moment. Maybe to avoid embarrassing the Parade Marshal, which I can understand. However, protocol dictates honors are rendered, whether the Marshal is embarrassed or not. It’s actually an insult to Poland and its people that hand salutes were not rendered.
Here is the paragraph from the AR for guidance.
1–10. Foreign national anthems.
During the conduct of a ceremony [a parade meets the requirements of a ceremony- DM], the performance of the national anthem of any foreign country will be followed without pause by playing the National Anthem of the United States. (An exception may be made only when two or more foreign national anthems are played in succession. The United States National Anthem will be played following the sequence.) The same honors rendered to the United States National Anthem will be rendered during the playing of the foreign national anthems.
I wonder if you are in the U.K. where a performance is attended by the Queen and the British national anthem is played, is it proper to salute?
Formations salute, organizational flags dip, individuals in uniform would seem to salute.