Welcome to HCM.
You have not mentioned how the diagnosis of stomach ulcer was made. Only sure way of making the diagnosis is by doing a gastroscopy.
Stomach ulcer provisionally diagnosed by symptoms
alone can be misleading and is totally unreliable.
You should consult a gastroenterologist
who will advise gastroscopy and if ulcer is present, biopsy
from the ulcer site
will be taken which has to be studied under microscope to exclude malignancy
You will also need an ultrasound study of abdomen to exclude any other pathology.
Long standing stomach ulcers may turn cancerous. Don't ignore your symptoms and don't treat on presumptions.
Wish you speedy recovery.