There are many different types of prescription, but let's just focus on a private or NHS prescription. On a private prescription, dentists can legally prescribe any POM (prescription-only-medicine). The GDC, however, advises that we restrict our prescribing to areas in which we are competent, and generally only prescribe medicines that have uses in dentistry.
However, when prescribing on an NHS dental prescription, we dentists are restricted to the medicines listed in the Dental Prescribers’ Formulary (this list can be found reproduced in the back of the BNF/on the BNF's website).