Of course McCain qualified. The Panama Canal Zone was US Territory. And besides that his parents were US citizens.
uS Territory but not the US. Same with Puerto Rico.