Method for embedding rock mosaic in transparent material
Another option would be to do two pours.


This would be what I would have tried/suggested with epoxy resin. Make the first pour and let it harden. Do your best to try and remove bubbles during both pours obviously. You don't want to pour to fill half but slightly less then that so your object appear suspended in the middle of the finished piece. This will be harder to accomplish if your objects are of greatly different thicknesses. What works against you here is that most epoxies are self leveling.

Once the first pour has hardened you can start the next one. Depending on the contours of your rocks you will need to be wary of trapped air bubbles. You could either put the rocks in first and pour or place the rocks mid pour. The ladder should mitigate the epoxy moving your rocks around during the pour. 

The two+ pours method is used frequently with painting to create the illusion of 3 dimensions. One example is this video showing the artist filling the bottom of the box with resin and a painted goldfish. 


Emil Hauge - Painting 3D fish

While looking for something else I found another video showing how to make a rock embedded coaster with resin and a silicone mold. Seems to line up with the suggestions given above. Only difference being the rocks were set before the first pour cured completely. If you want your rocks to be suspended it might be better if you wait until it has hardened.


  Also, what would be a good way of keeping a rectangular shape on the sides?


Using some sort of mold would be your best option. You see them commonly used in resin jewelry. Large rectangular molds do exist. A cursory search found a 7 inch square mold that was 3/4 inches deep.  

I saw someone use a mini red solo cup as a mold and it worked perfectly. You would need to test your resin first to see how it reacts. Not all resin products are created equally. 

I am not sure of other materials or home brew options for molds. It would have to be something non permeable. This could easily be another question.