My g. spengleri (mini-turtle) vivarium is a great example of this.
It's a 60g frag drilled with plumbing set up so that the water only goes 3'' high or so in the tank. It drains on one end, and I plumbed some PVC all the way around the back and corner to make an L spraybar on the far side, opposite the intake.
The entire bottom of the tank, except for a small "pond" around the intake drain, is filled with 2-3'' of porous lava rock, which is then covered with smaller rocks/leftover ceramic media, which is then covered in planted aquarium substrate, from which grow terrestrial plants.
So in order for the water to even get to the pond, it has to pass through nearly 4' of mechanical/bio filtration via live lava rock, as brought on by my "groundwater" setup.
The end result is water so clean that the sump below seems pretty unnecessary (except for raising the overall water volume in the tank, for stability). I do water changes about once a month just because I feel like I should, and usually just have to top it off when water evaporates.
And I'm sure that the fact that my swamp tank has a ton of wood/rocks in it adds greatly to the tank's ability to handle a large bio-load.
Just having rocks in your tank won't make a huge difference, though, unless they're porous (large surface area for bacteria to live on) and there's active waterflow around/through them.