Yes, with caveats. Some states have laws prohibiting the use of train horns as a warning system and only allow them to be used as part of an anti-theft system. At least one state requires certification and only allows a train horn if it’s hooked up and powered by the air brake system. Other states allow them as a warning system as long as they aren’t used frivolously.