ANSI (American National Standards Institute) is a North American standards organization, so it applies here. But enforcement is based on local Authorities Having Jurisdiction, some of which will insist on it, some of which will not.
NEMA (North American Manufacturers Association) is NOT a standards organization in the same way. They publish guidelines for the construction of electrical equipment, but there is no testing or policing, it's just voluntary compliance. However many of the NEMA design guidelines have made it into other testing and listing standards, such as ANSI and also UL.
IEC (International Electrotechnical Commission) is an international body similar to ANSI in that they publish standards, but like NEMA, compliance is up to the mfr., there is no independent testing authority associated with it. But again, it is closely associated with various Electrical regulatory bodies, mostly in the EU, who in some cases do have ultimate authority in their respective countries. Cases in point, Great Britain (BS, British Standards), France (CENELEC) and Germany (VDE). For the most part, IEC standards are not recognized by any regulatory bodies in North America.