I don't know if this is the appropriate place to post this (if it isn't, my apologies) and I haven't double-checked myself yet, but:
Allegedly, and according to this (French) youtube video: if all of your pc boxes are full when doing the mandatory Rayquaza capture in the Delta Episode of ORAS, if you choose not to put Ray in your team but to send it to the pc, the pokemon will get deleted from the savefile.
However, Zinnia still tries to teach your Rayquaza Dragon Ascent, which results in her teaching it to the first pokemon in your party.
TL; DR: Has yet to be double-checked but a glitch might allow for virtually
any Pokémon in generations 6 and prior to be taught Dragon Ascent.