No, it's not true, and you shouldn't let this erroneous thought take root in your mind. If it were true, no one could be saved - because every one of us has ancestors who didn't honor God. The Bible says, "For all have sinned and fall short of the glory of God" (Romans 3:23).
The Bible makes it clear that we each are responsible for our own actions. We aren't guilty for what our ancestors did - and they aren't guilty for the sins we commit. The Bible says, "The soul who sins is the one who will die. The son will not share the guilt of the father, nor will the father share the guilt of the son" (Ezekiel 18:20). The consequences of someone's sin (such as abuse or laziness) may hurt others, even beyond their lifetime - but that isn't the same thing as being held guilty for their sin.
The most important truth I can tell you is that God loves you, and Jesus Christ came to forgive you. If you had been the only person on earth who needed forgiveness, Christ still would have been willing to go to the cross and pay the penalty for your sins. God loves you that much!
What must you do? By faith turn to Christ today, confessing your sins and your need of forgiveness. Then ask Him to come into your life to forgive and save you - and He will.