A small mesa, sure. As at Acoma.
I'm speaking of the large mesas such as at Mesa Verde, which are really more like a plain or plateau cut by canyons. Once the enemy was on the mesa, which was much too large to control access to, the pueblos were definitely not defensible without changing their entire character. Rather than build castles, the Anasazi logically moved into the cliff dwellings.