Can you use an op-amp like this to detect current?
That will work with a single-supply op-amp like LM358. The connection between 0V and 16VAC is necessary (or something like that). It would be best to add a resistor in series with the non-inverting input of the op-amp since the input doesn't like it when applied voltages go much below zero.
Note: because Vos of the op-amp can be positive or negative, you cannot predict the state of the output with no current (could be either high or low). You could either add circuitry, use an op-amp with Vos or trim, or detect changes in your firmware- it will go high and low at the VAC frequency.
Note that if your VAC is higher than mains frequency (for PWM, for example), the op-amp may not be able to keep up. The last time I had a model train, the controller looked like this but I imagine things have moved on since then.