Arduino NANO Code Question

You don't have a conflict between the pinMode statements. These statements are executed only once when starting your sketch, and both set the same pin to OUTPUT. So at the end the pin is an OUTPUT.

Your conflict is the digitaWrite to that pin. Both - your input signal and you DCC signal set the same pin to HIGH or LOW. What do you want to achive by that?