They may be "contradictory" if taken in a literal sense, but proverbs are not really meant to be taken literally--whether those from the Bible, or from any other source.
Consider the definition of a proverb:
a short popular saying, usually of unknown and ancient origin, that expresses effectively some commonplace truth or useful thought; adage; saw.
As such, each proverb (whether Biblical or otherwise) must be examined on its own, to see what it means. Proverbs are very poetic, and full of imagery that should not be taken literally. Take any analogy too far, and you have chaos. Try to mix two analogies, and really weird things happen.
Consider a modern rendition of a popular chinese proverb:
I hear and I forget; I see and I remember; I do and I understand.
Is this saying that literally I forget everything I hear, but I remember everything I see? Of course not. It's speaking in hyperbole to make a point about what is often considered the most effective way of learning something.
Now lets look at your two Biblical proverbs:
Do not answer a fool according to his folly, or you yourself will become just like him.
What point is being made here? If someone does something foolish, doing something foolish in return only makes you like him. That seems like good advice, and this point stands on its own.
Answer a fool according to his folly, or he will be wise in his own eyes.
What point is being made here? When someone does something foolish, to make him aware of his folly, you must address his folly head-on, otherwise he will think his folly is wisdom. This also seems like good advice, and stands on its own.
And in fact, both pieces of advice can be applied to the same situation, as long as they are each applied appropriately, and in context.
If someone does something foolish to you, you can address his folly head on, without doing something foolish in return.
So no, they do not contradict each other, unless they are taken out of context, and overly literally.