I have 2 dogs my dog has had a similar sore and when I took her to the vet for diagnosis the vet told me it was a canker sore. My had told me to buy baby anbesol and use it before I feed the dog. I can;t guarantee it is the same thing but from what you described that's what it sounds like.
Good Luck
Good Luck