Floor outlet protruding under a rug
No, you can't.

An extension cord is designed for temporary use. Many of us (myself included) will use an extension cord on a "semi-permanent" basis.

But it is quite different to have an exposed extension cord and a hidden extension cord. An extension cord is not designed - or rated &amp; tested - for use in a hidden location. Use in that matter raises the very real possibility of damage to the cord from repeated walking on the carpet going unnoticed until it is too late (e.g., fire). Wires are also rated based on temperature, and a cord that is rated for a particular temperature based on being in open air may not be safe when used under a carpet, where it may heat up quite a bit more - also increasing fire risk.

The proper way to use a floor outlet is to have a cutout in the carpet around the outlet, and ideally a cover on the outlet when it is not in use to avoid dirt (or even worse, spilled drinks) getting into the outlet. I see that type of outlet in hotels &amp; conference rooms and it is a little ugly but functional and safe.

If you are not going to use the floor outlet at all, covering it with a movable rug is OK. But you should never cover an outlet or junction box of any type (e.g., including if you removed the outlet, capped the wires and put on a blank plate) with any permanent flooring like wall-to-wall carpet. All electrical connections (with very few exceptions) need to be easily accessible.