I just had my gall bladder removed and then two days later found out I had a bleeding ulser. Please take the test. I know it is unsetteling to think of but takeing care of the problems will help you feel better than you can guess.
The gall bladder emits bile to aid in digestion. If there is a stone it may block the bile from entering the duodenum which is the first part of the small intestine. If there is a blockage, or if there is a "gall bladder attack" it could cause the acids to remain in the stomach and not move through the digestive process. Excess acid in the stomach can promote the ulcer.
It would be very typical for your doctor to perform a gall bladder test to rule out stones or an attack.
Just my thoughts...