I've looked all over Bulbapedia, Serebii, the DB, and other sources and cannot find any evidence that Aerodactyl can be buffeted by Sandstorm. At first I thought it might have used Take Down and you mistook recoil for Sand damage, but you explicitly said that it used Ancient Power twice.
The only possible solution is if you used Soak on Aerodactyl in a previous turn. Then it would be Water-type and not Rock/Flying. But you didn't, so I'm pretty positive this was a glitch.