You have in fact trained your pup to use the rugs as toilet.
When you teach him to go on those training pads, it’s quite “logical” for him to classify your rugs as just another form of training pads. So he senses a need to go, finds the rug and does what he thinks he’s supposed to do. Outside, inside - a balcony is close enough to a room to be “the same” for him, just “another room”. In short, you have not taught your pup to do his business outside, you taught him to do so on a designated spot recognizable by a piece of cloth(-ish) material. Your question shows nicely, why I personally am not a fan of the potty pads.
I’m afraid that the probably best bet is to start over and really bring him outside whenever he shows signs of having to “go” - and in between. In short, restart potty training, accidents, praise and all, but this time with the right parameters. Yes, whisking him down a flight of stairs (or whatever your housing situation may be) is way more hassle than opening a balcony door, but I’m afraid that’s part of having a dog baby. For us, adding a cue was very helpful, our dog knows “pee-pee” and “poo-poo”, it may be helpful for you as well.
In the meantime, it may be wise to keep the area rugs stashed away for a bit longer. (And maybe also avoid bath-and doormats and similar for a while, just to be safe.)