Convert Rectangular Electrical Box in Ceiling to Octagon?
Edit: You said "rectangular" and "receptacle" so you probably have one half this size, not a square box...

There is a simple way to hang a light from a square box. You may have to look around a bit, but there is a mud ring/reducer that goes from square to round (and the round has the screw positions/spacing so a light fixture attachment will fit.)

 Image is from Crescent electric supply web site.

I have a couple of these myself. The adapter ring was in stock but not prominently displayed where I bought it, so it took a little hunting. 2-3/4" is the spacing for the inner screws - I think there's also a smaller one (2-23/32") for smaller fixture spacings.