A transistor can be used to sense the varying resistance but the circuit will be sensitive to temperature.
The sense error would be about 1% for 3 deg change.
Let us consider the 2-wire input as a resistor (actually it is like a variable resistance).
This resistor (two wire terminals) will be connected between the base and emitter of an npn transistor.
Then a constant current (calculation is approximated to have a practical starting):
Isense= Vbe / Rsense = 0.65 / 40 = 16 mA
So when Rsense < 40 Ohm , the voltage across it will be less than Vbe and the transistor turns off.
And when Rsense > 40 Ohm , the voltage across it will be greater than Vbe and the transistor turns on.
Unfortunately, the transistor will change from off to on (and on to off) gradually.
And as you noticed, the output state is the inverse of what we expect. One possible solution is to add another npn transistor to reverse it at the LED side.
And since we have now two transistors, it is possible to add a small positive feedback to let the transient region narrower.
Did you get the general idea? Could you try drawing a possible circuit so that we can discuss it together
Kerim