Your best options (as far as I know) are:
1. Resize the image twice (once for new row, once for new column)
im(end+1, :) = 255;
im(:, end+1) = 255;
2. Create a new image, and copy your subimage in.
im1 = 255 * ones(size(im)+1);
im1( 1:end-1, 1:end-1 ) = im;
im1 = zeros(size(im)+1);
im1( 1:end-1, 1:end-1 ) = im;
im1( end, : ) = 255;
im1( :, end ) = 255;
If adding data at the end, I would probably opt for (1). At worst, MatLab will create a new one and copy the data. At best, it'll expand the memory block and efficiently shuffle your data correctly. Otherwise, if you need to add rows/columns anywhere but the end, I would opt for (2).