There are a number of things you can do. Lock the text frame, or put it on a separate layer which can be locked or made temporarily invisible.
Is the image the same size/shape as the rectangle? This sounds a lot like you might be an old Pagemaker user who doesn't know you can add a stroke directly to the image frame (and a fill color too, which would show around the edge if the image were smaller than the frame). If at all possible you should consider if you can make the image and rectangle into a single object.
By the way, if there is transparency involved on the page, such as a drop shadow, you will want your text in front of the transparency, not behind it.
Peter