Yes, I too get this error when trying to open a file, but I assure you it's nothing new, I can't remember if I've ever been able to open it.
Well, when I want to open such a file, I make a copy and open it.
That said, avastlock.txt (0 kb) and other files are empty so it doesn't add anything to it.
On the other hand, if you try to open a log file >0 kb (e.g. in C:\ProgramDataAVAST Software\Avast\log), you get the error message but you can see what's inside by copying it
Anyway, to get back to the "and" problem, it's not quite the same because he says he gets an error when he uses the built-in windows cleaning tool.
As far as I'm concerned, if I use it, or if I use a third-party cleaning tool, I never get an error, even if the file isn't deleted for the security reasons you mentioned above.