I'd think that the answer might be yes, but not where they conflict with the requirement to maintain and create government records (which themselves are subject to FOIA requests), nor to the extent they would interfere with an subpoena or other required disclosure.
On the other hand, it might be an illegal condition on government employment.