Here is a possible circuit. I've not tested it but the idea of using a relay to connect the lower electrode has been used for decades. The ground electrode can be the tank if it's metal.
I've guessed at resistor values. A resistance in the water of around 100 kOhms will reduce the base voltage on Q2 and it will turn off, allowing the current in R3 to turn on Q1.
There is a possibility that Q1 will turn on and off very slowly, which could make it heat up, and it could be bad for the contacts of the coil. A more elaborate circuit would add some hysteresis. A high value resistor, maybe 1 MOhm, between the collector of Q1 and the base of Q2 might be needed.
If the water is very pure, it's possible that it won't conduct electricity well enough for this circuit to work.
Important:-
There is one possible danger in using this circuit. The relay will have mains on one set of contacts and the electrodes will be connected to the other set of contacts. If there is a short between the two sets of contacts, like a loose wire, then the electrodes would become live with mains voltage. Take care wiring it up.
Additional safety measures would include:-
Having all mains power supplied from an ELCB / RCD / GFCI which you probably should do anyhow.
Earthing all metalwork like pumps and pipes, which you should do anyhow.
Using two relays to keep the contacts separate
Earthing the -ve of the 12 V systems.
Connecting a zenner diode between the electrodes and ground