Its worse than that though, as it isn't a loyalty test -- US federal executive agencies have to adopt it whether they like it or not.
This doesn't apply to executive orders renaming things of course, since they're not illegal. But the point is that working for the government is not some sort of legal suicide pact.
If you do the thing then you're a criminal. If you don't do it, your employer will still do everything they can to make your life hell, such as illegally firing you for insubordination to an illegal order - you might get your backpay in court if you're lucky later, but you're never getting your job back.
You could say the president is just joking about such things; I don't think this will actually be acted upon, but the political/legal situation is quite rough.