Are academic associations obliged to comply with the US government? I'm shocked by the news that IEEE is forced to ban Huawei employees to be editors and reviewers.  It makes me wonder if, hypothetically, the US government determine to "ban" a certain group of people, which happens to include some academics, then under US law, are organizations such as AMS, APS, ACS obliged to comply and ban these people from academic services?

This question is different from Elsevier actions following US sanctions on Iran in that Elsevier is a publisher for profit.  IEEE might also count as a publisher for profit.  But the organizations that I'm asking here, namely AMS, APS and ACS, are purely professional associations.  If they are legally in the same status as Elsevier, it was not previously known to me, and possibly not obvious to others.
The organizations you mention, while not controlled by the US government, still need to obey all applicable laws and regulations; employment laws, for example. 

But the government, sometimes by presidential decree, has wide latitude to set regulations related to national security. In many cases the claims don't actually need to be proven. That is the nature of "national security". The fear is that it may be too late if you have to wait for congress to act or for solid proof. 

Whether this is good or not is a long standing debate as the power can be abused.