Yes, a Battle Master can give up their single-attack Attack action to use Commander's Strike.
You appear to be confusing the Attack action with an attack.
The Attack action is one of the things you can choose to do with your action; others include the Dash action, the Cast a Spell action, and the Use an Object action.
An attack is anything you do that causes you to roll a die to overcome someone's AC. Trying to hit with a weapon is an attack, but so is using a spell that rolls against AC, such as eldritch blast. You can make attacks without taking the Attack action, e.g. attacking with a spell using the Cast a Spell action, attacking with a magic item using its own unique action, or attack with a weapon using a reaction (e.g. using the Ready action, or making an opportunity attack) or bonus action (e.g. from Two-Weapon Fighting).
The prerequisites for the Battle Master fighter's Commander's Strike maneuver are that you:
- take the Attack action, which always allows at least one attack, and
- forego one of those attacks, even if it is the only one
The rules for grappling and shoving a creature are similar.
It's fine unless you're level 18
To see how Purple Dragon Knight (PDK) stacks up let's compare it to a fighter archetype from the PHB. Since we're worried about PDK being underpowered we only need to find one already accepted archtype that it is comparable to. We're going to use Champion because it is broadly similar and it's abilities make an for easy evaluation. Also we're only going to look at direct ability vs ability since the, "feel", of an archtype in play is too subjective.
Level 3
- Champion: Improved Critical for some occasional (1/20) bonus damage.
- PDK: A (fighter level) group heal once/short rest as a bonus action.
It's a judgement call but I'd say they are about equivalent at this level. Improved critical may or may not come up much based purely on luck but some extra group healing is always handy.
Level 7
- Champion: Half proficiency with some skills they may already have. Longer jumps.
- PDK: Extra skill proficiency. Double proficiency with persuasion.
About equivalent. Both archetypes just pick up some skills.
Level 10
- Champion: Another fighting style
- PDK: When you action surge one of your allies makes an extra attack. Goes up to two attacks from allies at level 18.
Since the fighting styles don't offer much synergy the extra fighting style is likely to give a bonus to the fighter's backup weapon or just +1 AC. A once per short rest extra attack for your allies is likely to do more damage in an average day; near certain to after level 18.
Level 15
- Champion: Improved Critical 2, the Critening.
- PDK: Bonus saves for allies a couple times per long rest.
Champion might be better at this level but it's a judgement call. If you value straight damage another 1/20 chance of critical hits is something. If you value survival clutch extra saves for your team is great. I'd call it a toss up.
Level 18
- Champion: Quick healing
- PDK: Your level 10 ability now works on two allies
This is the tipping point where Champion is clearly better than PDK. PDK's big finisher is just... a slight improvement of an earlier ability. That's pretty sad.
Conclusion
Below level 18 PDK is happily balanced versus Champion. At and after 18 PDK is just too badly hampered by its lack of an archtype-capstone ability. Luckily for PDK most campaigns are played well below 18 making this less likely to be a problem.
Note about the level of Inspiring Surge
While the book says the Inspiring Surge upgrades at level 17 that is apparently in error. This tweet from Jeremy Crawford says that it should be 18th level.
Best Answer
No, Battle Master isn't missing its level 18 feature.
You found it: increasing the superiority die size is what a Battle Master gets at level 18.
You seem underwhelmed. I'd point out that these high-level features strike me pretty variably: Beast Spells (druid) hits me as awesome; Indomitable Might (Barbarian), not so much.
Summed across levels 14-19 the various classes strike me as well-balanced, but in any class sometimes the features strike me as progressing unevenly. But your mileage may vary.