Several options to deal with it:
Close the prog/process that is using that file, then let Avast take care of it.
Boot in safe mode then run Avast
When Avast detects it, enable “remove on next boot when needed”