I'd only be disclosing it if I had been diagnosed with it myself. If your ex wasn't symptomatic when you had sex, then you probably didn't catch it.
That being said, use condoms if you're having sex with a partner who hasn't been recently screened for STIs. There's also a chlamydia thread current here - a bit of precaution would help prevent all this STI transmission.
Never regret anything that has happened in your life. It cannot be changed, forgotten or undone. So, take it as a lesson learned and move on.