Thanks for your response. Since posting I have been on online chat with Apple and found and solved the issue. I'll put the details here, in case it helps others. Before I erased it, the Mac originally had two different logins, one for general use, and one for admin. It turned out that the Admin login was signed in with a different Apple ID, and it was this one that the activation lock needed. I new just enough details about this login (Apple ID email address (but not password), trusted phone, machine login password for that account) to be able to update the Apple ID password, and then I was able to activate the Mac. I didn't realise that a single Mac could be set up with two different Apple IDs on different logins. Apparently it's always the ID associated with the admin login that is required for activation.
If I hadn't been able to get into that second Apple ID, the Mac would have been scrap. It belongs to a large organisation that I work for, and there is no way we would have been able to produce the original invoice from 6 years ago, which would have been required to get through the actication.