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.
Firstly, it is worth noting that (as Eidolon notes) temporary hitpoints do not stack (pg.198 PHB). That is to say, if you have 10 temporary hp, and gain 12, you now have 12, NOT 22.
Technically yes
With that in mind, as per this question, all actions that can be used in combat, can be used outside of combat. Combat is not special in that regard - it is just a way of resolving encounters in which the participants want to fight each other. So, RAW, maneuvers can be used outside of combat.
But a DM could reasonably disallow it
However, it could be argued by your DM that 'bolstering companions resolve' outside of combat is inneffectual as there is nothing around to damage their resolve. Hit points, including temporary hit points, represent not only physical strength and wounds, but also mental resolve. Gaining temporary hit points through rally represents having your mental resolve strengthened by an inspiring shout from the fighter. A DM might argue that, since 'rally' implies rallying characters from fear, this would only work in combat.
That said, I would be tempted (as a DM myself) to allow it on the basis that an inspirational speech before battle could bolster one's resolve. There is a reason why commanders of (e.g. ancient) armies gave speeches to their men before battle. Given that, as noted above, temporary hit points do not stack, this should not be too overpowered.
Best Answer
It means once per attack.
Whenever the system refers to an Attack Action it explicitly does so and you can always tell the difference besides it saying Attack Action vs. attack because Attack Action is capitalized and attack is left lowercase.
This is no way overpowered as superiority dice are a limited resource. A higher level fighter could use all of them in a round or two, using one for each attack they make (getting multiple through their extra attack feature), but that means for the rest of the fight or the next encounter they will not have superiority dice to use. While they get all of them back with short rest (or a long one) they are considerably less powerful than other classes' resources such as spell slots.