It would depend on the local zoning requirements and how the contract is written. Homes are sold all the time "as is" where nothing works and the buyer has to fix everything before they can get an occupancy permit to move in. Some municipalities require inspections prior to being able to issue an occupancy permit, but it depends on whether the contract required the seller (or the buyer) to have those inspections done. If there is a law, it would be a local one, there is nothing state wide that I know about.
We do typically have the seller do a septic disclosure as part of our seller's disclosure in the st louis area if they are on septic and we suggest that the buyer have the septic inspected as part of their building inspection. Some municipalities in our area have septic rules and if they know that the septic is not up to current requirements they may not allow the buyer to get an occupancy permit, but they can't stop the sale here.