You are correct, you are not allowed to run either the power cord or an extension cord through the wall. Both are considered Flexible Cords as covered by NEC Article 400.
"400.8 Uses Not Permitted. . . . flexible cords and cables shall not be used for the following:
"(2) Where run through holes in walls, . . . ceilings. . . , or floors. . . .
"(4) Where attached to building surfaces. . . .
"(5) Where concealed by walls, floors, or ceilings. . . .
"(6) Where installed in raceways. . . ."
Note that (4) prohibits you from even attaching the cord to the outside wall surface.
Be aware that Romex, while recognized by NEC, is specifically prohibited by many townships. A better choice might be armored cable (also known as BX or type AC). Get the BX with a green grounding conductor in it in addition to the black (hot) & white (neutral) conductors.
If you already have a receptacle below the TV, extending the circuit up the wall to a new receptacle behind the TV using BX is a snap if you're relatively handy, or cheap to have a handyman install -- my guess is about $100 to $200 tops. Usually you can do it with no patching or painting required of the wall surface.
Your signal cables, on the other hand, may be run through the wall without conduit. They are covered under Article 800, which permits you to use about whatever kind of wire you want for them so long as they are less than 50'. One key exception -- special (and rather expensive) cable types are required to run through HVAC ducts or plenums per NEC 300.22).