On the basis that one is a better version of the other - I would have to go with Chavez. Hatton H2H beats many of the top 140lb'ers - but Chavez is the best ever and would win by late stoppage, 10th or 11th. Hatton would give him some uncomfortable moments, notably with his left to the body and well disguised straight right.
Chavez by T.K.O. But Hatton would defo be in the fight, until the stoppage. (I don't think Julio would allow Ricky to tie him up on the inside)
I am a big Hatton fan, but have seen Chavez in action and they have some glaring similarities - notably their ring savvy and whacking opponents to the body. Chavez is just better in pretty much every department and would win by late TKO. Without a referee, the fight could probably go on for a year with both guys crawling out of the ring holding their ribcages.
IMHO the only way you could justify Hatton winning would be on work rate, by out hustling Chavez. MAYBE the Hatton of 2005 could pull it off.....I'd still put my money on Chavez though.
The Hatton that fought Tszyu would have had a chance against anyone, P4P. He hasn't really repeated that since then - there have been signs in a few fights, the odd round here and there, but that performance was staggering. I watched it live and was backing Tszyu by late stoppage, for Ricky to pull it off was one hell of an effort.