If you have chlamydia and have had no other sexual partners, then I believe it is impossible for your ex not to have it. He may have been tested before there was enough bacteria present to substantiate a positive test.
Your doctor is correct. It is impossible for him to give it to you and then have it clear up on its own.
Please check out the Centers for Disease Control and Prevention Website on this disease. Please click this
link.