Weird permissions error

Yesterday I was using TextEdit on a MacBook Pro under Monterey to create a file on a flash drive, progressively pasting in text copied from elsewhere. Suddenly I got an error message that said “This document could not be autosaved. You don’t have permission to write to the folder that the file is in.” That didn’t make sense, since I had already saved the file at least once manually, giving it a name. So I tried saving it manually again, and got an error message that said “The document “name.rtf” could not be saved. You don’t have permission. To view or change permissions, select the items in the Finder and choose File > Get Info.” The Finder showed that the file did exist in its intended place, along with an autosaved version. Not only that, but Get Info showed that both the RTF file itself and the enclosing folder already allowed me read/write permission.

Using TextEdit’s “File > Duplicate” feature, I made a copy of the file that I was creating, and manually saved it to the same directory. This verified that the permissions on the folder were correct, and the the error messages from TextEdit were wrong. I can only conclude that a hardware or software corruption of TextEdit’s memory occurred somehow.

Incidentally, the text being pasted in came from Text Sniper’s Additive Clipboard, but I do not see how that could have caused an error in TextEdit.