Hi there, as you give a history of erratic diet and skipping meals you may be suffering from gastritis
as pointed by your doctor and the constant pain that you experience may be due to gastric ulcers
. You have not written whether you are constipated, if so then the blood in stool
could be due to tear in the rectal wall called fissure caused due to hard fecal matter and that explains the pain as well. In all likely hood this may not be cancer but a case of anal fissures. You need to regulate your diet and eat lots of fruits and vegetables along with plenty of water and excersise. It would do you good to to visit a surgeon who can advise you with some stool softners and lubricants. Do take care of your health and do not neglect your nutrition as your mind works better with proper nutrients.