yes. yes they can.
They'll invoke one of the more ambiguous sections, it's usually the anti-terrorism one, but sometimes is the anti-drugs one (i can't remember the numbers), and they'll detain then arrest you and haul you to the police station.
You can complain later, and maybe get some pounds out of it, but make no mistake: if the uk police wants you identified, they will identify you.