This is incorrect, as it would punish the child for the sins of the parents. The children of cohabiting parents are more than welcome to receive the sacraments in the CC. In fact, one might even hope that the parents viewing their children receive the body and blood of our Savior while they can not might kick them in the pants to normalize their situation.
Otherwise perhaps the children will receive a handy cap but it won’t come from the Church. Rather it will come from their parent erroneously teaching their children that “all love is valid” and there for that there is absolutely nothing wrong at all with cohabitation which could have a tremendous impact upon the child later in life, perhaps even affect it’s salvation.