Not exactly sure about the UK specifically, but elsewhere in Europe you can absolutely take any course that the university offers - it just wont be accredited and you will gain 0 ECTS Points, which you need to collect in a timely manner to complete your degree.