Though the more objective answer would be that it goes either way.
Old Rayleigh was already a grandmaster in all the fundamental forms of of Haki, so Prime Ray must have been quite easily a master level Haki user in all the advanced forms. That means Advanced Conqueror's Haki, Advanced Observation, and Advanced Armament on top of world class swordsmanship ability and top tier physical attributes. He was able to match an Admiral and keep up with Kizaru in terms of speed and combat, so Prime Rayleigh should be Yonko level by default and a peer to Fleet Admirals such as Prime Sengoku and Sakazuki.
On the other hand, Akainu is all but missing an official confirmation for being a Conqueror in his own right but he has all the traits and characteristics of one including the fact that his predecessor Sengoku is a confirmed Conqueror's Haki user.
It comes down to whether you'd take the Pirate King's Right Hand Man in his prime or the Fleet Admiral leading the strongest incarnation of the Navy. Due to how little we have seen of both (especially Rayleigh), there isn't really a right or wrong answer.
And yes Prime Rayleigh > MF Akainu.
Also yes I am one of those people who absolutely believes that if Sabo and Akainu were to fight now, Akainu would absolutely kill him. Though that isn't really relevant in this discussion but I'm just putting it out there
Rayleigh indicated that in his prime he’d have been able to handle defeating Kizaru, Sentomaru, and Kuma while also protecting the SHs; he also implied that he’d defeat current Teach. Unless Akainu turns out to be significantly stronger than Kizaru or current Teach post-TS, then Rayleigh deserves the benefit of the doubt here.