First, make sure that the layer mask is selected. Now create a rectangular selection and fill the selection with white. Don't worry if you can't get the selection where you want it to be; we will fix this later.

Between the layer and its layer mask, there is a link icon. Click on that icon and it should disappear indicating that the layer mask is unlinked from the layer. With the layer mask unlinked, we can move the contents of the layer mask without causing the layer to move.

Right-mouse click on the layer and select "Blending Options".

In the Blending Options window, checkmark and select "Stroke". You should now have a set of options for the stroke. First, set the position to inside and color to white. Then, adjust the size to create a white border around the photo. Click OK when done.
