I believe it should, that is meant to be what the on-access scanner does, when you access an executable avast should effectively intercept the call, scan the file and if clean allow the call to continue.
However, I think I know what your are talking about. I have a copy of eicar.com in my exclusions folder (for various things that avast would alert on. Now if from explorer I double click eicar.com, first a command window opens as this is a dos file and shortly after that I get the avast alert, finished of by bad command or file name. So I don’t know if it is being executed, as effectively there is no executable code inside the eicar.com file, perhaps that is where the bad command or file name comes from (See image 1).
If however I choose delete rather than no action at the end of it I get access denied (See image 2) so I don’t know if that is an overall denial or not.
If I copy it out of my excluded folder avast alert immediately so it isn’t even being called to be executed and the creation of a new file is being intercepted and if you opted for deletion, etc. it wouldn’t exist to be executed.
So I don’t know if you have stumbled on a strange occurrence in the way avast intercepts .com files or if this is because the com file only has the eicar string inside it.