When I will move my Rayquaza with all of the ORAS and X&Y ribbons into the poke bank then to Ultra Moon, will the ribbons and the special contest star animation stay on my Rayquaza?
Yes, your Rayquaza will keep all the ribbons from any past games.
However, the Contest Star will not be there due to the fact that the Contest and the Contest Hall are not in Ultra Moon.
Source: Personal Experience.
Hope I helped :)