We already discussed that Rashi was the first one to be noheg not to pass anything to his wife while she was a niddah. here
The Galya Masechet qoutes the Rambam who says here that minhagim that started after the time of the gemara are not binding. So how can the shulchan aruch and others say that it's an issur to pass to a niddah?