Can stomach pain in a generally healthy adult mean cancer? Which doctor treats cancer?

It depends. Pain in the stomach can occur due to many causes. It may be transient or persistent or even progressively worsen. If the pain is persistent and interferes with your quality of life or you have any weight loss, you should go see your doctor for a detailed examination and tests, if required. Cancer is less likely but we can not guess without proper medical examination and testing.
Stomach pain. Upper abdominal pain can be gastritis/ ulcer H pylori (bacteria associated w/ulcers), esophagitis, which are not cancers - some may predispose if not appropriately treated. There is gallbladder /biliary disease usually stones - not cancer. There is pancreatic/ liver cancer, Lower abdomen -diverticulitis , inflammatory bowel , irritable bowel and colon cancer. If pain f/u w/doc. pain is not normal.