To answer the title question directly, a pilot can refuse to take off for pretty much any reason. Similarly, an airline can cancel a flight for pretty much any reason. So, the short answer is: Yes, they can.
Longer answer: In the specific situation described here, it sounds like the aircraft originally scheduled to operate the flight became unavailable with relatively short notice (could be a mechanical issue arose or the plane was unexpectedly out-of-position due to a storm or some such thing.) The next best option was apparently an A319 they had lying around. Obviously, the latter is smaller than the former, which requires that some people must be denied boarding, either voluntarily or involuntarily. Of course, simply not operating the flight at all is also an option, but it's a rather dumb one in most circumstances and the airline is unlikely to actually do that.
They will, of course, try for voluntary denied boarding (by offering the incentives you mentioned) first. This is better for everyone as people who need to get to their destination on schedule still do while those with more flexible schedules can get some nice perks. I've even had a case personally where we volunteered our seats and were rebooked onto a direct flight on another airline that actually arrived before our originally-scheduled flight that required a connection - and still got the offered airline credit voucher out of it, too. - haha - Also, in a significantly overbooked situation where not enough people appear to be volunteering, you can have some significant bargaining leverage here, too. You can always try to bargain for something better than what they're offering. The worst they can say is no. They have a pretty big incentive (avoiding an angry horde of passengers) to get volunteers. In most cases, though, enough people will volunteer quickly that you won't have much leverage.
Failing voluntary denied boarding, they'll resort to involuntary denied boarding, though, as MeNoTalk mentioned, this is relatively rare. These passengers will still generally be compensated, but, of course, it could mess up their schedule. If you are selected for involuntary denied boarding and (for some odd reason) are already on the aircraft and you refuse to leave, you're failing to comply with the instructions of a flight crew, which is a crime in most (if not all) countries. As MeNoTalk mentioned, you should expect an unfriendly encounter with the local police in this situation, so I wouldn't advise it.
As a matter of clarification, 'denied boarding'
is the term normally used by airlines for the situation where a passenger either volunteers to take a flight other than the one they're scheduled on ('voluntary denied boarding'
) or is forced to take another flight ('involuntary denied boarding'
) even though their scheduled flight is still operating. As far as I know, it's still considered a 'denied boarding' regardless of whether the decision for you not to take that flight happens before or after you've physically boarded the plane. The term 'bumping'
is also used less formally to describe these situations, though, if I remember correctly, it technically only refers to involuntary denied boarding. The legality of the airline's options is generally unaffected by whether or not you've physically boarded the plane. Certainly the option of not actually operating the flight is always available to the airline and/or pilot.