Most of my setups are melamine and I use UTHs with all of them.
You can use a UTH outside the tank, underneath it. Just make sure that the weight of the tank isn't resting on the UTH and that there is a little airflow over the surface to prevent overheating. I make a mat of taped together cork floor or wall tiles the size of the tank, then cut out a section the size/shape of the UTH. Put the mat in the cutout and place the tank on top of the mat. Put the thermostat probe inside the tank, on the floor immediately above the UTH's position. The heat from the UTH comes through the melamine floor without any problems.
You can also use the UTH inside the tank, although I avoid this when possible due to the risk of snakes pooping on it and causing a short. Cover the surface of the mat with something like a layer of loose ceramic wall tiles, which conduct heat well. I also add extra shielding over the point where the cable joins the mat, as this will be most at risk from any contact with moisture. Put the thermostat probe immediately on top of the ceramic tiles.