The orange color of stool, can result from a lack of bile, which along with digestive enzymes in bowel tract changes the stool color from green to orange and final brown.
The lack of bile in your bowels, probably, is caused due the blocked bile ducts by gallstones, inflammation.
Pain under the left rib, that may radiate to the back, accompanied with nausea and vomiting, appearing after meal, can be due to pancreatitis.
There is a type of pancreatitis caused by gallstones blocking the part that is union of common bile duct and pancreatic duct.
So, you should be checked for gallstones, and performed laboratory tests for your pancreatic and liver functions.
I guess you suffer from acid reflux, too (as you said bits of bile come up).
If you are taking antacids to treat the acid reflux, check if the drug contains aluminum hydroxide, cause this substance can give your stool orange color.
Best wishes!
Marija