APEX 5.1 is getting old, especially when it comes to newer components like the Interactive Grid. I'll show you how this can be done in 20.1 (and likely several releases before). Thanks to John Snyders for the help!
To hide the button, you could use:
apex.region("emp").call("getActions").hide("edit");
But you'd probably want to update the grid view and the model too:
var grid = apex.region("emp").call("getViews").grid;
grid.view$.grid("option", "editable", false);
grid.model.setOption("editable", false);
Finally, all of this would update the UI, but could still be undone in the front end. If you really wanted to prevent it you'd have to add a server-side validation (related to IG) that checks the same conditions as the client-side logic.