Rayleigh quite literally didn't go all out
He didn't even use his Internal destruction Haki much less advCoC
So what does that mean?
Even kizaru isn't going all out yet.
Rayleigh and Kizaru were effectively stalling each other. Neither could get past the other. Rayleigh said that age slowed him down. He said that there is
no possible way he could've defeated Teach, which means it's not Teach >= Rayleigh but a clear cut Teach > Rayleigh and that's despite Teach's fighting style is designed to be a good counter to DF users, so Rayleigh loses to Teach despite being a bad match up to him.
What exactly puts old Ray on par with Luffy? Luffy has internal destruction and barrier Haki too, he displayed a level of ACoC that was compared to the clash of Roger and Whitebeard, he has future sight, something Rayleigh is implied not to have and he awakened his Nika fruit which gives him reality altering abilities and the power to create island sized Kong Guns.