In some cases, yes. Only about half the states legally require their electors to vote for their assigned candidate; the others are, ostensibly, free to change their votes. In addition, the penalties for breaking the rules are so minimal as to be virtually meaningless. However, only about five electors — who are described as "faithless" — have ever done that, though most of those have occurred in the last 30 years.
Are there any exceptions?
Yes. Nebraska and Maine use a proportional vote system. Two of each state's electors are chosen by the statewide vote, while the remaining members are determined by the popular vote within each congressional district.