Whilst BS7671 does not actually prohibit the use of Class 1 fixed or stationary equipment outside of zone 2 it's not something I would encourage, Class 2 devices more readily satisfy the requirements of locations containing a bath or shower.
As most tumble driers are Class 1 stationary equipment, if it's located 3m from zone 2 and supplied from FCU rather than a socket-outlet on an RCD protected final circuit, it would be OK, but not ideal.
My main worry and concern is the unattended operation of a tumble drier located in a cupboard, although this prevents direct access to the equipment, it could increase the fire risk by reducing the airflow in/around the drier and the possibility of poor venting, leading to increased operating temperatures and also the build up and trapping of cotton lint from the clothing leading to a combustible atmosphere. There are about 1400 washing machine and tumble drier related fires in domestic premises every year so this is a real and potential risk. The landlord of a rental property contemplating such an installation might wish as part of the risk assessment and duty of care to consider the installation of a heat detector in the bathroom and an emergency switch located outside the bathroom to disconnect the supply to the appliance in the event of a fire.