Assuming you have an image variable, not a widget on the UI, called app.img, it should work. But I don't know what app.img is. Did you assign an image as a new field of the app structure? If so that should work. But if img is the name of an axes control that you placed on the UI window that would not work. You would need to get your actual image variable and rotate it and then display it. Something like
rgbImage = imread('peppers.png');
rgbImage = imrotate(rgbImage, 90); % Rotate it and put it back in the same variable.
imshow(rgbImage, 'Parent', app.img); % Display it in the "img" axes control on the GUI.