I did this the entire time I was staying at my grandparent's house with Tuffy. Tuffy had just realized that he could mark so he wanted to mark EVERYTHING. I caught him twice in my grandparent's bedroom peeing on their rug!
I just had to hustle to clean it up before anyone noticed. He probably had about 6 "incidents" while we were there before it finally dawned on me to keep him on a leash and by my side the rest of the trip. He hated me for it but at least my grandparents thought he was an angel.