No, pinworms aren't like bacteria and viruses that cause common infections. The body isn't able to clear pinworm infections alone and people don't generate the same immunity to pinworms as they do to bacterial or viral infections. Effective treatment requires oral medications to ensure the elimination of the pinworms.