No the pain can't be because of excess saliva..
May I know where is the ulcer exactly located in the mouth??
Because the nerve supply of done areas in mouth also supply in the ear, so it can just be a referred pain.
Next Steps
kindly take vit b 12 supplements and hydrate yourself.
Health Tips
avoid hot spicy and hard food items.