Electrical isolation, yes. Because DCC comes through the track as alternating current with coding on it and the motor is direct current that has been decoded from the incoming power, so there needs to be a chip in the way to transmogrify what comes in into what the motor needs.
Mechanical isolation is impossible!
Why not go back to where it , and ask that individual to explain further?
Do consider also isolating the signalling function from the driving function as part of the driving and operating design for the layout, otherwise DCC “becomes the message as well as the medium”, and real railways don’t work that way.