Here's the answer to the problem thanks to a user from SAP community.
Here's the updated code for the press
event handler that resolves the current model
var button = new sap.ui.commons.Button({
text: "Button",
press: function (e) {
var model = this.getModel();
var path = e.getSource().getBindingContext().getPath();
var obj = model.getProperty(path);
console.log(obj);
}
});