In Oregon you could sell a home with water quality issues as long as it is disclosed and the buyer wanted to take responsibility for the filter. I can also tell you that I haven't seen a buyer yet not request that the seller pay for the system. I assume you need a reverse osmosis system.
What your agent may be referring to is a lender requirement. VA, FHA, and USDA require that the home not have any health of safety issues for lending. So in that case, the house would fail to qualify for financing and the buyers could terminate, typically, on that contingency in the contract. I assume your contract says that the property has to qualify for financing. It might be that if you don't put in the system you will have an essentially unsellable property.