What is a heterodox? (From Hawthorne's The Scarlet Letter)

A heterodox is a religious person who disagrees with church beliefs; an unorthodox.

It might be, that an Antinomian, a Quaker, or other heterodox religionist, was to be scourged out of the town, or an idle and vagrant Indian, whom the white man's fire-water had made riotous about the streets, was to be driven with stripes into the shadow of the forest.

From Hawthorne's The Scarlet Letter.