Yes. However, you will be required to pay an early termination fee if you exit the contract within your minimum term (see answer to "If I exit the contract early, is an early termination fee owed for the phone and service? If so, how is this calculated for each?" below).
If you are a Three customer and wish to exit the contract within your minimum term and unlock your phone so that it can be used on other networks you will need to pay a handset unlock fee, which is an amount equivalent to the early termination fee (see answer to "Is there a charge for unlocking my phone, and if so why?" below).
For the avoidance of doubt, Three customers will not be required to pay the early termination fee in addition to the handset unlock fee in such circumstances – they are alternatives depending on whether you wish to: a) exit your contract early without unlocking your handset, or b) exit your contract early and also unlock your handset.
Former O2 customers wishing to exit their contracts early and unlock their phone so that it can be used on other networks will need to pay the early termination fee.