Threadworms do eventually go away on their own even without medical treatment.
The Threadworms will eventually die inside of you within about 6 weeks as long as you do not swallow any new Threadworm eggs.
I would highly recommend seeing a doctor to get some medicine to kill the Threadworms much sooner so that you don't have to feel bad and deal with the Threadworms for too long.
I would rather take some medicine to kill the Threadworms instead of waiting it out and being sick.
But eventually after 6 weeks the threadworms should be fully gone as long as you do not ingest any more Threadworm eggs.
I would highly recommend seeing a doctor if you are infected with threadworms.