Can you jettison a project to work on another in the wake of a big discovery? Let's say Alice is a PhD student who's well into the research phase of a PhD. She's got a nice exciting project she enjoys, a helpful supervisor, she's making good progress. And then there's a big discovery. She's excited about the new discovery, she wants to work on it, and her current project suddenly doesn't seem so interesting anymore. Real life example: suppose Alice is a Chemistry PhD student from the late 1980s working in condensed matter, and the big discovery is cold fusion.

Can Alice ditch her project to work on the new discovery? What if the new discovery is in an area that is not her supervisor's specialization? I'm also curious whether Alice can make this switch if she's a professor (as opposed to PhD student).

My guess would be that it's hard for Alice to do this as a PhD student even if there's another supervisor available, because she would have to start over again and therefore take longer to graduate (running into funding issues). It'd also be an administrative hassle especially if she has to change departments (Chemistry to Physics in example above - the fields are related, but not that related). If Alice is a professor then she would presumably be stuck, because she's got to work on her grants. She could apply for new grants related to the big discovery, but it would be a while before she can work on it. Am I correct?
Can Alice ditch her project to work on the new discovery? 


Alice has many responsibilities in her life, including satisfying her sponsor and producing her thesis. Whether she should ditch her project depends on those responsibilities. IMO, she perhaps doesn't have enough time to fulfil her obligations and ditch her project (PhDs are short), so she might need to delay working on the new discovery. There's perhaps an exception if Alice is in the early stages of her PhD.


  What if the new discovery is in an area that is not her supervisor's
  specialization? 


That's not particularly relevant: Many students work under the supervision of advisors that aren't specialists in their research areas.


  if she's a professor (as opposed to PhD student).


Then, she isn't bound to the time constraints of a PhD, but still has other responsibilities.


  I'm also curious whether Alice can make this decision


Yes, she can. Who else would make it? Pressure may be applied by others, but, ultimately, the decision is Alice's. (That said, she may get sued for her decision, e.g., if she ditches her project without delivering upon contractual obligations, but that's perhaps unlikely in academia, even less-so for student-Alice, as opposed to professor-Alice.)


  I'm also curious whether Alice can [feasibly] make this switch if she's a professor (as opposed to PhD student).


If Alice truly wants to switch, then Alice can make it happen. There may be many barriers: personal, institutional, contractual (including funding obligations), ... But, they can be overcome. That said, should she switch? That's up to Alice. She perhaps has a relatively easy position right now, switching will be a massive upheaval.