In British slang, "nonce" is a highly derogatory term used to describe a sex offender, especially someone who has committed sexual crimes against children, such as a pedophile. The term carries a strong stigma and is often associated with prison slang.
Aside from slang, "nonce" can also mean something created or done for a particular occasion or purpose, such as a "nonce word," but this usage is neutral and unrelated to the slang meaning.