I don't think so. Because everything is OK when the story doesn't have anchored objects...
Is it possible that applied object styles are causing the issue?
But, following your suggestion, I checked the story lock state after export the textFrame to icml and get "CHECKED_IN_STORY".
That is what it should be, or not?
Maybe you ran into a bug?
Is every error telling the same "Object is locked." message?
Then I suppose it's for every object in the group perhaps…
Will there be no error messages if the anchored groups do not contain text frames?
What is the version of your InDesign and OS?
InDesign CC 2017 and Windows 10.
My client figured out what is causing those error messages. He disabled
some features in the object style (like auto size and text wrap), and, in
some cases, applied None ObjStyle. The error messages doesn't appear
Maybe a bug?