playBunny: "a" is called the indefinite article for a reason -- "a pencil" is the opposite of "no pencil" and implies nothing at all as to number. Of course context is still important. In the context of pencils the essence of the question is whether one has the tools necessary to write something down; number is not significant. In some cases, the expectation is that there will be either exactly one or none of the specified item, and if more than one are present, a simple affirmative could be misleading. Thus, a bigamist, when asked "Do you have a wife?", should answer: "Yes, I have two."
If you want to elicit information about the number of pencils a person has, "Do you have a pencil?" is the wrong question. It would be better to ask: "How many pencils do you have?", "Do you have an extra pencil?", "May I borrow a pencil?" etc.