The USA is threatening trade sanctions if Germany builds the pipeline. I would not call that "not-allowing".
That seems to be OP's whole point. The US is responding as a sovereign nation to actions of other sovereign nations. Phraseology like "allow" and "disallow" are not accurate. If Germany does the cost-benefit analysis and decides to cancel the pipeline because they don't want trade sanctions, that was their decision as an independent nation. It is not as if we are threatening war.
When the US pulled out of the Iran nuclear deal, for example, it essentially ordered European companies not to trade with Iran. Even European companies that have no business in the US are afraid to do business with Iran, because American secondary sanctions will still hit them. No European bank will lend to a European company that does business with Iran, out of fear of American sanctions.
These sorts of actions will eventually provoke a reaction: either the establishment of alternate financial systems or retaliatory sanctions.
Are allowed to break the law? Are you not?
If the US wants to impose a tariff to nations that do X, that does not mean that the US is forcing these nations to do anything. They can pay the tarrif, change their behavior, or sell their goods elsewhere. Or they can charge a counter-tarrif -- oops, not if they are an export-dependent economy they can't. That's the crux of the issue.
Germany needs to pay their own workers enough so the German economy is not dependent on exporting a 1/3 of their GDP each year just to maintain domestic employment.
Obviously when you create an economy that crashes the moment others stop letting you run massive trade surpluses, then you are effectively handing your sovereignty over to your trading partners.
Whining about that and blaming your trading partners for using the power Germany has given them seems a bit naive.
Germany will never be sovereign as long as it is an export-dependent economy.
ding ding ding. Germany is allowed to build whatever pipelines they want, they just also might have to pay US trade sanctions. Without a threat of force, we are not forcing them to do anything.
The USA didn't just do it to voice their displeasure: they could have done that with an email.
They truly think its enough of a hammer to stop the pipeline.
Hence "won't allow"
Forget about the third-world, right now the USA is not-allowing Germany the right to build a pipeline with Russia!
First-world - check, sovereign - check, allies - check.