Er, some terrible misinformation on here…..
They can ask who they want what they want, however they need your consent to do so. If they contact somebody without your consent then withdraw the offer on the info provided you would have a good case at tribunal.
Most companies just give basic factual info now, through fear of being sued because of subjective references. Not because of any specific piece of legislation.
So give the details of your HR department or former manager, as long as they are still within the company, if they are with another company then just give HR details.
Job offers are generally made subject to satisfactory references by the way, so don’t give notice yet if this is a concern.