Well, the Aztecs didn’t do a half-bad job of resistance in really bad circumstances, as we see from La Noche Triste. which almost wiped out the Spanish. So yeah, if things go worse for the Spanish, the Aztecs could have avoided disaster and given themselves an opportunity to consolidate their position.
To me, the question mark is smallpox. Even if the Aztecs manage to see off Cortez, smallpox is going to be wildly destabilizing and create vulnerabilities for the next conquistador to exploit, so victory against Cortez might just delay rather than prevent conquest.