But they aren't classified as ambassadors though. EU member states still have their own ambassadors and send ambassadors to each other as well as other countries, and retain largely distinct legislatures except where required for international alignment on the free movement of goods, capital, services, and people. The EU itself as a political entity has envoys as opposed to ambassadors, though they're effectively the same thing to all intents and purposes.
Well, we're running into the fact that the Federation has been depicted as having all of the traits of a sovereign state in its own right (which the European Union is not, although it comes close in certain respects)
and the idea that an interstellar federal union cannot reasonably be expected
not to have diplomatic missions between its constituent polities. Like, yeah, there's no Ambassador of the Commonwealth of Virginia to the State of Maryland in real life, but I don't really see how, say, Earth and Vulcan could have a relationship even within the Federation without having a direct bilateral exchange of diplomatic missions.
There are a few real-world precedents we could draw upon.
For one thing, "ambassador" is not always a formal title; sometimes it is informal. The heads of the various diplomatic missions to the United Nations Organization are often called "ambassadors," but this is not strictly their legal title; their legal title is "Permanent Representative of [U.N. Member State Name] to the United Nations."
In the Commonwealth of Nations, the heads of diplomatic missions between Commonwealth members are not entitled as "ambassadors;" rather, they are entitled as the High Commissioner of [Sending Commonwealth Member State] to [Recipient Commonwealth Member State]." So, there's no British Ambassador to the Republic of India, for instance; there is a High Commissioner of the United Kingdom of Great Britain and Northern Ireland to the Republic of India. (Similarly, they don't have "embassies," they have High Commissions.)
Thirdly, there are instances in real life of direct bilateral or multilateral agreements between U.S. states, called interstate compacts. They have to be submitted to Congress for approval, but they exist. And U.S. states sometimes open offices in one-another's capitals to promote their home state industries. Similarly, each state in Germany has an office in the federal capital to represent that state's interests -- a sort of de facto embassy of that state in Berlin.
So we could account for the existence in dialogue of ambassadors of one Federation member to another by synthesizing these three real-world precedents. My personal head canon is that Federation Member States can conduct direct bilateral or multilateral diplomatic relations between one-another, subject to Federation regulation; that the diplomats exchanged between UFP Members are informally referred to as "ambassadors" but are actually entitled as High Commissioners of X to Y; that the de facto embassies exchanged between Federation Members are actually High Commissions; and that Federation Member States also maintain de facto embassies on Earth, often called embassies, but actually styled as High Commissions of [Sending Member] to the United Federation of Planets.
So in my headcanon, Sarek's formal title was actually High Commissioner of the Confederacy of Vulcan to the United Federation of Planets, and the "Vulcan embassy" referenced in TMP was actually the High Commission of the Confederacy of Vulcan to the United Federation of Planets. And in my headcanon, Jonathan Archer may have been called "ambassador to Andoria," but his actual title was High Commissioner of United Earth to the Andorian Empire. Etc.