I don't think you want a simple "Y" in that set-up, you want a Y-valve, so there is only one operating path at a time, depending on how the valve is set: for overboard discharge or for discharge to the holding tank.......I thought my description would be difficult to follow:
If you have a wye which is connected to the thru hull and the holding tank, when the loo is pumped out the waste will take the path of least resistance, and, since the thru hull is below the water line will have more resistance than the holding tank inlet (assuming the holding tank is not full), therefore the waste will tend to flow to the holding tank, and not overboard.
Neil