ISPs are PERMITTED to disclose personal details, linked to an IP address, to the police for 'the prevention or detection of crime' or 'the apprehension or prosecution of offenders' WITHOUT a court order. [Section 29(3) of the Data Protection Act 1988 provides an exemption from the normal 'non-disclosure' provisions of that Act].
However many (possibly most) ISP would choose not to do so unless a court order, forcing them to make the disclosure, had first been obtained.
Anyone worried about their online activities being traced back to them via their IP address simply has to hide that address by:
(a) configuring their browser to route their internet traffic through an anonymous proxy (
http://nntime.com/ ) ; or
(b) using a VPN that keeps no log files (
https://torrentfreak.com/anonymous-vpn-service-provider-review-2015-150228/ ) ; or
(c) using Tor (
https://www.torproject.org/ )