I have a genetic issue that gives me mild ulcers and canker sores when it flares up. It's never been bad enough to demand medication, but there are times when I go heavy on the pepto in hopes of helping my oft-upset stomach. It hasn't happened lately so I completely forgot about this myth.
Basically, my doc says no, and when you think about it, it wouldn't make any sense. Why would the oil from a relatively inert herb put holes in your stomach? THC and the other compounds that give weed it's oh-so-notorious nature don't do anything anywhere else in the body except the brain (as far as we know) so beyond that it's practically hemp oil, which would be comparable to really nasty vegetable oil. It is just another plant.
SO maybe it does, because of it's current status there's no source of research you can trust. In light of common sense however, I do not see why it would be any different than say, eating something with olive oil in it.
Ultimately, an ulcer is probably not going to kill you. I would say, hey, try it, and if you don't start having pains that feel like a hot iron is being driven slowly through your abdomen, then everything is fine.
If it happens it probably wouldn't kill you anyway and you aren't physically addicted, so just don't do it again. Weed is great because it's not forever. If it fucks you up, just don't use it again. It won't drag your ass through a pit of hot coals if you stop using it, as i'm sure you're well aware.