Welcome to HealthcareMagic. A sharp pain
on right side of chest, could be due to a simple muscle cramp, infection of lung/pleura
, it could be related to gall bladder
or even liver for that matter, as you rightly guessed.So I would suggest you get a complete blood count
with a chest Xray be done. And visit a physician and get evaluated properly. Get well soon.