I have a toothache and the dentist told me that I need a root canal. Could I choose the option of having the tooth pulled?

When a tooth hurts because of a cavity that has invaded the nerve, the only existing treatment to save it is endodontics (killing the nerve). If you opt for extraction (taking out the tooth), the only way to fill the space will be by means of a prosthesis.