According to canon Law:
Heresy is the obstinate post-baptismal denial of some truth which must be believed with divine and catholic faith, or it is likewise as obstinate doubt concerning the same…" (Canon 751).
Canon law is only formally binding on Catholics, so canonical penalty regarding heresy has no force upon a Protestant. But any baptized person can commit heresy.
There are two kinds of heresy: formal and material.
Formal heresy, as with all sin, would require full knowledge and full consent in denying or seriously doubting some truth that must be believed. So, for example, a Protestant who knew, accepted and believed that Christ is God and then later denied his divinity would be guilty of formal heresy, as would a Catholic.
Material heresy is when one holds heretical doctrines through no fault of one’s own, such as when one is brought up in heretical surroundings. We would not call such a person a heretic in the strictest sense. He never accepted certain doctrines to begin with, and so he cannot be said to reject them or doubt them.