A few things come to mind. Where was the ulcer located that was removed a couple years ago? Could she be experiencing some lingering issues or could her bladder have been damaged during that surgery? Has she always done this or was she perfectly housebroken and this has happened in recent weeks/months, etc?
What I would do:
Limit her eating to twice a day. Leave food down for 20 min and if she doesn't eat, she doesn't eat. I would remove her water about an hour before you go to bed and make sure she goes out and pees.
Check the UTI again, just to be sure.
Or...she could just be mad at you. I went out of town and let a friend, who my dog knew, stay at my house as a dogsitter. She was walked, she was loved on, she still got to sleep in our bed. Once I got home, she peed every friggin chance she got in the same damn spot. I would leave for 20 min, let her out to pee, she would pee while I was gone. I finally just got to the point where I would put down papers with plastic underneath so the carpet wouldn't get wet. She only stopped when I finally moved out of that house.
Dogs can totally be bitches.