Walls are generally not a formal requirement, but are implied so due to their commonality. All ancient cities, especially pre-civilization, had walls though, often several layers of walls built on top of each other as the given cities were pillaged and rebuilt.
Its not confusing to anybody vaguely aware of ancient history.
IIRC, the Sumerians (through the Akkadians perhaps) left records stating they had to build walls around their cities. Which to me certainly implies the Sumerians had cities without walls for some time. Pretty big deal that, to have recorded it.
Cities subjected by some empire or another were sometimes forced to tear down their walls and there were perhaps periods of relative isolation and peacefulness during the founding of some cities where one wasn't immediately necessary, but even very ancient settlements commonly had at least palisades. There are probably some other exceptions; Sparta famously did not have walls under the philosophy that nobody should ever dare even try them, but they were also blessed by geography.
*All ancient construction that we've found and called cities had walls
Neither ancient Rome nor Sparta had walls for centuries after their rise to prominence. A number of per-Colombian Andean cities didn't have walls. Tenochtitlan didn't have walls and it doesn't look like Cholula did either. And in the Indus Valley Civilization Harappa and Mohenjo-daro didn't have walls.
Tenochtitlan didn't have walls because it already had natural defenses (water); so that's a particular case.
I'm not sure Tenochtitlan was technically a city.
The defining characteristic of a city is that it can't feed itself. (Hence the "urban" vs "rural" dichotomy.)
Correct me if I'm wrong, but Tenochtitlan was a closed system and used to have farms on the lake and the islands.
Neither of the other city states in the Aztec Triple Alliance had walls either and they weren’t built on islands.[1] They seem to have had some walled precincts to separate sacred spaces from common areas but now broader system of defensive walls. Much like Ancient Rome they had large and well organized armies.
[1] https://www.public.asu.edu/~mesmith9/1-CompleteSet/MES-SAA-0...