The clerk was right to point out that if you need 4.5" you'll need to get a nominal 2x6, which is really only 5.5" wide, and cut an inch off it. (A lengthwise cut like this is called a "rip", so you could ask the shop if they could "rip" it down to exactly 4 and a half. I don't think you'd use a planer take a full inch off, planers are for removing smaller amounts. Many lumberyards can rip boards for you; I've seen them rip 2x4's to make up an order for 2x2's.)
But the other dimension is actually harder. That 2x6 is only 1-1/2" thick, so if your project needs a full 2" in that dimension, you're half an inch shy. And the average big-box store may not have anything in stock thicker than the nominal 2". In modern construction, posts, beams, sills and other thick components are likely to be made up of several "two-by" boards glued and nailed together--or special-ordered "engineered lumber" which is a composite of wood and glue. Even if you're matching the size of studs in older homes, which may have been exactly 2" by 4", it's only the 4" direction that's important, because it's thickness of the wall. Nobody cares if the stud is a little thinner in the other direction. This may be why the clerk only paid attention to the 4-1/2" direction, and ignored the 2".
Specialty lumberyards might have 4x6s. You could phone some and say "Do you have 8-foot lumber that you could rip for me down to finish size exactly 2 inches by 4 and a half" and see what they say. ("Finish size" is a common way to say the actual measured size of a finished product.) You're definitely getting into a specialty market.
At risk of re-framing the question, what most folks would do is design their project from the beginning using the standard dimensions that will be in stock: 2x4's, 2x6's, 4x4's, and so forth, all of which being slightly smaller than what the numbers will suggest.