What can cause a lump to form under the right rib cage?

Many causes. This problem mandates a real-time (face-to-face) meeting with a doctor. A history has to be taken along with a examination as well as labs and other tests. Only after all this will your doctor be in a position to tell you what's wrong and what needs to be done to help you.