The same error message reappeared shortly after I posted my previous message. I now suspect that KiCad may be trying to autosave the project into the read-only Program Files directory. It shouldn't do this for a read-only project.
I can trigger the same message by manually trying to save the file.