I know nothing about dojo loaches - you will have to get information from someone else for that. BUT.... goldies - I do know.
Undergravel filters are not recommended for goldies. Sure, you can make them work - and some have. If you reverse flow the UGF, you have a better chance. But, by and large, an undergravel filter is a disaster just waiting to happen for tha goldfish. If you use a reverse flow with a power head, you stand the best chance at getting the filter to work acceptably.
Undergravel filters work by sucking all the waste down through the gravel, so that it collects under the plate that is on the bottom of the tank. That plate will hold the waste under there while bacteria that resides there processes the waste to less toxic forms. GREAT. That is a cycle.
The problem occurs twofold, with goldfish. Unlike a lightly stocked tropical tank, goldfish make VOLUMES of waste. They are really really reallly MESSY fish. They produce bumper crops of waste. All this waste will typically overwhelm the average UGF in no time at all. Not all will be processed. After a fairly short time, the underplate will become "full" and the filter will stop processing properly.
The second problem has to do with the type of fish a goldfish is.... (ooooh lousy grammar!!! sorry). Anyway, a goldfish is a bottom feeder by instinct. They spend most of their days picking through the substrate of their environment, looking for food.
An UGF typically works only on an airstone used to lift the water, causing a flow through the gravel and up. This is a very gentle, slow filtration - and is not enough for a messy goldfish. You can add a power pump to the UGF and achieve greater flow to solve this problem, but you are still faced with the biggy - how the bacteria in an UGF works.
The bacteria that live under the plate are not quite the same bacteria that colonate a HOB filter. The HOB filter bacteria use oxygen, combined with the ammonia/nitrite to produce nitrate. The bacteria that live under the plate are mostly an-aerobic, meaning that they can process the waste without oxygen. The by product can be a toxic gas. As your goldfish pole around the bottom of the tank, looking for food, it is possible that they could overturn a stone and come up with a snoot full of toxic gas suddenly released. I have heard tales of healthy fish that over turn a stone and go instantly belly up - dead. (


If you are planning on planting your tank with live plants, be forwarned that in the majority of tanks utilizing UGF, live plants do not thrive. Also, if you use a fine silt for the plants, this will sift down through the plates slots and fill the pocket under the plate - shutting down the UGF .
When you need to clean the filter - and with goldies, that will be OFTEN - every week or so - you have to remove all the gravel and vacumn underneath. Make sure you remove the fish from the tank - for the gases that are released when you lift the plate are toxic.
Personally, I would never use an UGF for any tank because I would hate the bother and time it would take to clean it regularly. But, for a lightly stocked tropical tank, it may be just the ticket. A reverse flow one would be even better.
As far as substrates, I do not have them. I run bare bottom. My fish are exceedingly healthy and I know exactly what is in my tank - no hiding parasites, no excess waste, etc. I spot scales that have dropped, food that is uneaten, eggs that have fallen, etc. The fish do not mind - and actually thrive. I use a stone here and there for aesthetic purposes in some tanks, and silk plants in all. It works well.
If you are going to use a substrate, you need to balance between having large enough stones that the fish do not swallow them and small enough that you can move the vacumn tube amongst them easily. Snad is a no-no in a goldie tank. As a bottom feeder, they will stir up a constant haze of sand in your tank - such that your tank always looks like there is a sand storm in there. (not to mention what the sand is doing to the fish's gills!)
Many people use alternative substrates - marbles and more creative substrates. I have seen some really NEAT tanks with alternatives in them!
Sorry - I wrote a book. I really really do NOT like UGF!