I assume US as the jurisdiction, and don't purport to have checked all 50 states for laws deviating from federal law. The question is not clear as to what exactly is being done (something that has a reasonable relation to "consent"), so to be concrete, I assume the proposal is to take samples from waste water and analyze cells for the presence of a specific genetic property. I also adopt the convenient fiction that from that cell, one can extract information that allows an absolute match between the sample and an individual (or set of individuals in the case of identical twins), if you have a sample from the individual.
Consent would be required to draw a blood sample or take a saliva or skin sample from the individual. Otherwise, collecting the sample is assault. No consent is required to pick up a cup that a person has used and discarded (it would be assault to grab the cup from them). "Informed" consent is special kind of consent applicable to medical care, and reduces to the requirement that the medical care provider explain the risks and benefits, so that the individual will agree to undertake some action (let them cut into you, prod you, give you drugs). None of those considerations exists in the proposed experiment.
HIPAA imposes a requirement of maintaining privacy w.r.t. health information, mainly via the Privacy Rule. A clear application of the rule is that if a patient is diagnosed with cancer, the health care provider cannot publicly disclose the patient's name and diagnosis. If the record is anonymized, the diagnosis can be disclosed. (The full information can also be "shared" between parties with a statutorily-defined interest in the record, e.g. the insurance company). An important limit on HIPAA is that it does not apply to everybody, it only applies to "covered entities", and is limited to healthcare providers, healthcare clearinghouses, and health plans. Genetic researchers are not healthcare providers, so they are not covered entities, so they are not subject to HIPAA.
There is also what is known as "The Common Rule", which is a restriction on what you can do in research if you receive federal funds. Let us assume that the research is federally funded. §46.102 defines a "human subject" in subsection (e), which is very long. The core of the definition is that the researcher
(i) Obtains information or biospecimens through intervention or
interaction with the individual, and uses, studies, or analyzes the
information or biospecimens; or
(ii) Obtains, uses, studies, analyzes, or generates identifiable
private information or identifiable biospecimens
(i) is not applicable: the question is whether the cell is "identifiable private information or identifiable biospecimens"
We move on down the definition to learn that
Identifiable private information is private information for which the
identity of the subject is or may readily be ascertained by the
investigator or associated with the information.
and that
An identifiable biospecimen is a biospecimen for which the identity of
the subject is or may readily be ascertained by the investigator or
associated with the biospecimen.
An individual is not, in the general case, readily identifiable from their DNA, even if theoretically you could identify an individual by taking DNA samples from everybody and matching to the water sample. This research is not human subjects research, so the rule is irrelevant.
The regulation doesn't say what "readily identifiable" means, so of course technol9ogy or circumstances could change and this planned research could become human subject's research. In the universe in which that happens, it simply complicates the process. Then the researcher must submit the proposal to their IRB, which will check that the protocol protects the anonymity of the "subject". That would probably preclude publishing the specific information plus the full whole genome sequence. Here, we would have to engage in wild speculation as to how having an anonymous DNA sample makes identification "readily available".
Of course if Congress rewrites the law to include "imaginably identifiable", that changes everything.