If a lawyer discovers that a client plans to commit fraud with his help, is the lawyerforbidden to blow the whistle?

Is the lawyer allowed — even obliged — to blow the whistle?