USA and nuclear weapons?

Is the United States of America allowed to use nuclear weapons in times of war? I know that the USA was the first to use them in battle decades ago, but aren't they a part of the Treaty On the Nonproliferation of Nuclear Weapons as of now?
4 answers 4