Is this actually legal? I mean, these are public institutions funded by the people of the US. They should be allowed to communicate, no?
It wasn't that scientists were not allowed to communicate with the public, it was that they had to work through the PR department. The PR arm of the institutions would delay, filter, and even edit publications that touched on sensitive areas (eg. Anything remotely connected to climate change--like even fisheries related data).
Fortunately, Canada came through this period. But we did see the closure of research stations and destruction of scientific data.
So, to answer your question, many legal steps can be taken to stop, slow, of even eliminate scientific communication.