why file attachment in oneNote(Mac) is locked and how to bypass it?
It is not possible right now, because files attached to OneNote-notes are always read-only copies in the current version. If you edit them, Mac OS X saves the changes to a copy of the file in a location you can choose. To update the online copy of your file with your changes, you'd have to remove the old version of the file from the note and attach the copy with your new changes to it.