Is a lawyer in the United Kingdom obliged by law to inform the court or the police if his or her client confesses to a crime he or she has committed? I looked everywhere, can't find this answer.
Assuming that privilege applies, no
Not all communications with your lawyer trigger privilege and if it doesn’t then the lawyer is not your lawyer and is under the same obligation to report as any other member of the public.
If privilege does apply then they must keep your secrets.
If they are defending you and you confess to the crime then they can:
- represent you if you plead guilty
- withdraw unless that would prejudice your defence
- continue to act providing that they do not:
- suggest someone else committed the offence
- set up a defence inconsistent with the confession
- they can: argue the prosecution has not made their case, that you are not guilty of the offence charged by reason of law, or argue for any other (non prohibited) reason that you should not be convicted.