I have no certainty on this answer as there are a few species of lamprey, only one of which spends all its life in fresh water. The sea lamprey is probably the most likely to attach to a swimmer - so the answer would be yes. However, the risk is relatively small as sea lamprey are not commonly found in British waters as a general population - it seems mostly Northern areas such as Norway, North Sea and the Baltic.
The same source above has this to say about human attacks:
Lampreys do not attack humans as they are adapted to attach themselves
to cold- blooded fish and not warm-blooded mammals. Occasionally
lamprey will attempt to attach themselves to a swimmer but they can
be fairly easily removed, and would probably detach themselves anyway
when the realise that they are not feeding on a fish. Swimmers in
America’s Great Lakes appear to be the most commonly ‘attacked’ by
lampreys. The famous Canadian long distance swimmer Marilyn Bell
successfully swam the thirty-two mile width of Lake Ontario in 1954
when she was just sixteen years old. Along with strong winds, high
waves and bad weather she listed attacks from lamprey which
constantly attached themselves to her swimming suit and attempted to
feed on her as one of the biggest challenges of the swim.
However, I can not find any record of statistics on lamprey attacks other than mention that they are very rare - so probably not a thing to be concerned about in either fresh or salt water.