When trying to make changes to a document, you encounter following error:

"Edit is not allowed for non master versions (Error code: 501) when making changes to a document."

This occurs when a document is currently opened by more than one user.
The user who has opened and already made changes to this document first will have the changes go through. For other users, they will encounter the error.
In order to actually make changes to this document, it must be closed by whoever has it opened then reopened by the user who wants to make changes.