Kinda tying our hands behind our backs here but I suppose that IF I had no tester but I still HAD to figure out the polarity of something as you posit, this is what I would do.
Assuming that you are talking about some low-ish DC voltage, (3 VDC to 24vdc or so), simply place a rectifier in series with what you are powering.
The banded end of most axial rectifiers is the cathode or (-) side and the other side is of course the positive or anode side. Like this:
Or for really high currents, something like this:
(Note:) The above diode is a STUD MOUNT rectifier and its polarity is marked with the diode symbol. I just included it to cover my bases.
Anyway, once you have your rectifier, you disconnect one side of the dc source from its load and replace it with one side of the rectifier; doesn’t matter which, flip a coin.
Now, connect the other side of the rectifier to the connection that you just pulled off of the dc source.
There are only two outcomes, the device will either work normally or it will act dead. So try both ways and see which side of the rectifier is connected to the power source when the device works. If the device works while the cathode is connected, then that is the negative side of your source that you connected to and you guessed it, if the device works when the anode side of the rectifier is connected to your source, that’s the positive side.
If you just have a battery or wall wart, etc that you are trying to gauge the polarity of and there is no “device” per se, then just use a light bulb of the proper voltage and power range for the load.