If your pug was truly reliably housetrained before your female came into season, then it is likely in response to her being in 'heat'. However, we should never assume cause and effect relationships, so it is also a good idea to take your pug to your veterinarian for a good check up and probably a urinalysis just to make sure there is not a urinary tract problem. And both need to be spayed and neutered - if your pug is not neutered the marking will almost certainly continue.
If the marking is related to your female being in season, it should subside once she is spayed, however, in the meantime you don't want your male's behavior to become a habit. This means you are going to have to step up the supervision for a while - use baby gates to prevent him from going into rooms by himself. Keep him in your sight at all times - leash him to your waist if necessary. You can also put a pair of toddler training pants on him - cut a hole for his little tail.
Make it harder for him to mark, should your supervision fail - put pieces of upside down carpet runners (pointy side up) on the floor where we would have to stand to lift his leg on your furniture. Clean with a quality enzymatic deodorizer such as "Anti Icky Poo" - funny name, but great product, just google it to find where you can buy it near you. - some veterinarians carry it, most pet stores do not.
Oh - and although you don't mention this - no punishment after the fact, by trying to drag him over and show him his mess - won't work and will create more problems.
Hope that helps
is he fixed???cause he may never fully stop, being male and intact, i couldnt see a neutered male doing it, get em both fixed, and after it shouldnt happen again