A key principle of virtually every engineering licensure law, standard of professional conduct and code of ethics is that engineers should always and only practice in the technical areas in which they are competent. The licensing process uses education, experience and examination to identify those who have presumably acquired sufficient competence.
However, there is a loophole of sorts: In most jurisdictions, once engineers become licensed, it is entirely up to them to define their own areas of competence within the profession as a whole.