Well you have to play defensively as well as offensively with Rayquaza. For example, let's look at what he's packing.
Type: Dragon/Flying
Attacks: Fly, Rest, ExtremeSpeed, Outrage
Ability: Air Lock (negates weather effects)
If you have anything with REALLY high defense, like Aggron or maybe a strong Golem or something, you can use that to block Outrage and Fly. ExtremeSpeed you needn't worry too much about. Rest will annoy the hell out of you, since he can pull this out when you least want him to.
A strong Electric-Type or something with a strong Electric attack should be of some use here for inflicing damage. Yes, Elec attacks will be normal damage, but you still get the chance of paralysis. Not worth it to attempt Burn and Poison, as both could accidentally KO Rayquaza (as well as Fire attacks not being very effective). Of course, Rest will negate those. If you're feeling bold or crazy, you could bring something with Ice Beam or Blizzard and go for freeze. Yes, freezing Rayquaza will prevent him from doing much. HOWEVER we all know how much Dragon/Flying types love Ice...
And for the record, you CAN throw a ball at Rayquaza while it's using Fly. Not sure if that had any impact on when I caught him in Emerald. Only took me 3 Ultra Balls, and the one that got him happened to hit him in the middle of said attack.