Yes, you can use a relay contact between pin and ground of the Arduino, with internal pull up enabled.
And the (12volt) relay coil driven by the 12volt device.
Another way is an opto coupler.
1-10k resistor in series with the opto LED.
Opto transistor between pin and ground, also with internal pull up on the pin enabled in pinMode().
Leo..