Hi,
My initial reaction was yes, but that wasn't backed by anything other than Arduino can certainly react to sensor inputs of that type, and activating relays is also a snap. Adding some science to my enthusiasm, googling arduino model railway gives pages of projects and examples to get you on your way.
All the best!
Geoff