Yes.
However, there would have to be a mutual consensus. The individual, their family, and a medical professional - there are too many ways in which the law could be exploited if it weren't rigorous enough.
You shouldn't be able to kill someone if they asked you to. You should have to have a doctor check them and then they could carry out the procedure themselves. Otherwise the situation of "but they asked me to" could arise in an otherwise murder situation.