Hello!
Thank you for the query.
Stomach pain and fresh
blood in stool does not seem to be caused by the same reason.
The most common reason of fresh blood in the stool (on the surface of it) are hemorrhoids or anal fissure (this condition gives also strong pain while passing the stool). Hemorrhoids are usually caused by constipation, lack of physical activity, long regular sitting, bad diet.
Stomach pain (upper middle pain) can be caused by peptic ulcers,
stomach inflammation or
Helicobacter Pylori infection. If your pain is more in the upper right area, gallstones can be the reason. With gallstones, the pain can radiate to the back, nausea and vomiting can be present.
If your pain is in other part of the abdomen, you should consider all other
abdominal pain reasons. Most common are
urinary tract infection (lower abdominal pain, burning while urinating), ovarian cyst (lower abdominal pain). If you have cramps also, your abdomen gets bloated and the blood is mixed with the stool, inflammatory bowels diseases should be considered.
I suggest you to visit you doctor and have some basic tests. Blood work, liver tests, abdominal ultrasound and gastroscopy should be first.
Hope this will help.
Regards.