As far as I know what you're hoping to do is not possible out of the box. A workaround would be to create a helper object with an “editable” attribute, based on which you can set the visibility of the buttons within your snippet. It's not pretty, but it should work.
In addition to Eline’s useful answer: conditional editability is not for security, so make sure your entity access, roles and permissions are set correctly.
I have submitted an idea for this here: https://forum.mendix.com/link/ideas/2909.