A dubious post that spread on X became the basis of false claims that Iran’s leadership had declared it a nuclear power.