If puppy with ulcer is not drinking
fluids, then dehydration can be more serious than usual. If the dog becomes dehydrated then the acid will become more concentrated in the stomach. The acid blocker will help reduce the acid, but it only takes a little to irritate the ulcer more.
I'd get the dog to a Vet hospital and ask that they inject large volumes of fluid SC. This might help via reabsorption of fluids to lessen the stomach acid.
Encourage any way you can for the dog to drink. Flavor the water with diluted broth if need be. Anything you can do to dilute the acid with fluids will help. If the dog continues like this go back to the Vet, and ask for the doggy dosage to give for Prilosec.