Rabbotai,
The gemara discusses Bait Chonyo, an alternate Bet Hamikdash set up by Chonyo in Egypt. The Gemara doesn't mention the words "kodshim bachutz," which is obviously what the discussion is about, aside for the discussion of possible avodah zara.
1) How could anyone think that Bet Chonyo would not not involve bringing
kodshim bachutz? It was outside of Eretz Yisrael? After the building of
the 1st Bet Hamikdash there was a permanent issur of bamot. Even if a bama
would have been allowed at the time would that mean it would be allowed
outside the borders of Israel? We weren't even allowed to live in
Mitzrayim! How could someone set up a valid bet hamikdash there?
2) Chonyo's alternate bet hamikdash existed at the same time as the Bayit
Sheini. Even if one holds that the first kedusha of Eretz Yisrael was
nullified (kedusha rishona) with the churban - the 2nd Bet Hamikdash was
standing! The kedusha was reinstituted by Ezra and his bet din. That was
probably a permanent kedusha (l'shata and l'atid lavo.) But even if one
holds that it wasn't permanent it was at least in effect at the time the 2nd
Bet Hamikdash was standing.
Gmar tov,
Samuel Kosofsky
1) Your question is whether Bamos are permitted outside of Eretz Yisrael. This Gemara seems to be a proof that when Bamos became permitted, they also became permitted in Chutz la'Aretz (see next answer below for when the Bamah of Beis Chonyo became permitted). (The Acharonim discuss this at length, as summarized in the Talmudical Encyclopedia, "Bamah.")
(Regarding living in Mitzrayim, see our Insights to Sukah 51:1.)
2) The Gemara's discussion was whether it is permitted to offer a Korban on the Mizbe'ach of Beis Chonyo nowadays , as Rebbi Yitzchak states, "I heard that we may offer Korbanos on Beis Chonyo b'Zman ha'Zeh ." That is, after the Churban of the second Beis ha'Mikdash. During the time of the Beis ha'Mikdash, it goes without saying that it was Asur, as you point out.
Regarding whether Ezra's Kedushah (Kedushah Sheniyah) was permanent, see Tosfos at the end of this Amud who discusses this and concludes that according to everyone, it was not permanent. See Tosfos there, and see also our Insights to the Daf.
Be well,
Mordecai