Oh, I'd not recommend hydrocortisone unless you know it's safe in the event it's ingested.
Our son has always been a thumb sucker. He's almost 4 and still does it when tired. He's never had a rash like this, but he has had several chapped thumbs in the winter. We asked the pediatrician who recommended Aquaphor.
But, I'd honestly recommend seeing the pediatrician to confirm this is really what's happening. Our son is jokingly called Linus (from Charlie Brown) because he's such a massive thumb sucker. If it is an infection of some sort, treating with the recommended products may be more harmful than helpful. It's possible it's something like Eczema that would present similarly (our daughter has been treated for eczema since she was ~12 months and had it around her mouth as well as other areas).