Yes, but only if your responsible clinician authorises it under s17 of the Mental Health Act (‘s17 leave’). S17 leave may be used to authorise you to spend time on the hospital grounds, visit the local shops, or even return home. The leave can be escorted (with ward staff) or unescorted.
S17 leave is usually built up gradually during your time in hospital and is used as a way of preparing you for discharge.