The threat is China demanding total payment at once (my vague understanding of the actual real world problem due to debt owed). Something that the US has laws protecting land and home owners [1], but no law says another country can't do this to us.
[0] https://en.wikipedia.org/wiki/Government_bond
[1] https://en.wikipedia.org/wiki/National_Housing_Act_of_1934
But espionage, market and currency manipulation, copyright and patent infringement and a miriad of other activities are illegal, yet China does them with impunity.
I can imagine they can demand whatever they want, (they are a sovereign nation) and can use that debt as a bargaining chip to be used in any negotiations.
In theory, I think you are correct, in practice, who know what is possible?
Now it's obvious, it's economic warfare, and a foreign power that creates an imbalance of this nature could be reasonably classified as an invasion.
Note, the US government doesn't "buy" companies, private citizens do. Yet, I would have no issues with private foreigners buying companies, I do think having a foreign government buying companies is very bad, especially if their leader is a dictator for life.