Non-healing ulcers in the gastrointestinal tract can certainly be associated with cancer
and should be followed closely.
This mainly pertains to stomach ulcers but atypical intestinal ulcers have a potential for cancer as well. In general, most ulcers should heal within 8 week on proper therapy, in most people. There are, however, always exceptions and close follow up is recommended.