On the subject of Agrabah being the name of just that city: I watched this film again today. For, um, research purposes.
In the opening scene, the merchant narrator fellow says:
“Welcome to Agrabah, city of mystery. Of enchantment. And the finest merchandise this side of the River Jordan, on sale today, come on down!”
And then he goes on to show off his water pipe that can also make fries, and his Tupperware box.
I suppose it could be a city-state, though. If city-states can be that wealthy.
For that matter, it could also be like Mexico, the capital of Mexico.
At any rate it can’t be a fictional city inside an existing country. It has the freakin’ sultan’s palace in it. It could only sensibly fit into a country with no capital and no royal palace of its own.