Of course they can, everyone can buy bitcoin.
However keep in mind that if they attempt to buy *all* bitcoin, the price will arise and eventually it will become unaffordable.
On top of that, if government buys all bitcoin and owns it, it would be pointless because no one else would have.
Instead, a better idea would be to launch their own cryptocurrency and compete with bitcoin.