While technically true, since rust is an iron oxide, the meaning behind the "metal rusts if wet" statement was more generic and less scientific. If you are a bit more forgiving in the interpretation of what was said, you could have acknowledge that aluminum does indeed oxidize over time. Aluminum just happens to have a nice property where the oxidation process creates a protective film that helps prevent further oxidation. Aluminum can be exposed to elements that destroy that film and result in accelerated oxidation.
And if you want to see something extra fun, look at what mercury does to aluminum without that protective film.
Aluminum does not rust, and galvanized steel will easily outlast a solar panel.
https://en.m.wikipedia.org/wiki/Hot-dip_galvanization