I have been having dull constant pain under right rib
possible gallbladder stones
Hi and welcome.
Such pain may be present in both lung and abdominal issues.
It may be a sign of pneumonia, pleurodynia or pinched intercostal nerve.
But if chest X-ray was fine then this can be ruled out.
Next step would be to do an abdominal ultrasound to rule out gallbladder stones or liver disorders which may manifest as pain under the rib cage.
Third, some spine issues such as a disc hernia also lead to similar pain so this should be checked with spine MRI if ultrasound is fine.
Till that I suggest to take Acetaminophen/Tylenol or Ketorolac for pain, have easier food and avoid physical activity that aggravates pain.
Wish you good health.