Agency rules are not laws, and thus are not actually subject to the prohibition against ex post facto
laws. Notably, if existing laws or rules would already apply to make activities illegal, and the new rules are simply making that explicit, the courts will upheld (criminal) charges based on the new rules.
Importantly, with agency rules, courts can and have looked at the "intent of the law" authorizing the agency's rules to uphold criminal convictions under newer agency rules that were technically within the scope of the rules at the time the acts were committed.
This happens all the time in the tax world; see for example the Bermudan tax loss harvesting scheme that got a lot of people sent to prison even though the schemes were technically within the rules at the time accounting firms started selling them to clients.