They don't use lead in pencils anymore. So I hope the pencil that your dog has swallowed did not contain any led. If that is the case, then don't worry about his chewing or swallowing a pencil. Pet dogs usually love to chew and eat such odd stuffs. He will get fine soon, as the pencil is made of wood and with some paint on it. Anyhow, if he has swallowed a lead pencil, then you should be worried, and take him to a vet for poison control treatment.
Take him to your toilet and let him drink
Take him to a vet are you crazy he could led poison. Take him immediately.