Yes, it says,
"
He that overcometh, the same shall be clothed in white raiment; and
I will not blot out his name out of the book of life, but I will confess his name before my Father, and before his angels." (Revelation 3:5).
As for names being written in the book of life before the foundation of the world:
Well, there is one group of people whose names were not written in the book of life since the foundation of the world. These are they who will worship the beast in the future (See Revelation 13:8, and Revelation 17:8).
As for everyone else:
Jesus is the Lamb of God slain before the foundation of the world (Revelation 13:8). Jesus is the propitiation for the sins of the whole world (1 John 2:2). Jesus is the Lamb of God who takes away the sin of the world (John 1:29). But does that mean everyone is saved? No.
With the exception of those who will worship the beast in the future, I believe Jesus died for everyone's sins and paid for those sins before the foundation of the world. So when they are born as a baby, they are saved by Christ's sacrifice. Adam's sin corrupts the flesh and or the body. Man was given a sin nature (in the flesh) by Adam. Their body is destined to be condemned by physical death because of their sinful nature. This is why God prevented Adam from eating of the tree of life because if they lived forever, they would be living forever in an imperfect sin infested body that could be open to sin again.
So if a baby dies, they are saved by Christ's sacrifice. If a baby grows up (to an age where God holds them accountable to sin) and they learn to sin, they then fall back into an unsaved state, and their name is blotted out of the book of life and they need to repent and accept Jesus as their Savior to be saved again (i.e. to have their name re-added again to the book of life). Grievous sins is what separates a believer from God. Seeking the Lord's forgiveness and in forsaking sin (Walking uprightly) is whereby one will have their name not blotted out of the book of life. For he that overcomes will not have their name blotted out of the book of life as Revelation 3:5 says.
Okay, so as to quickly recap:
1. Jesus is promised Savior before creation and all are in book of life (Except those who will worship the Beast).
2. A baby is saved by Christ's sacrifice (With the exception of those babies who will grow up to worship the Beast)..
3. When a child grows up to be considered accountable to sin (in God's eyes), their name is then blotted out of the book of life.
4. Their name is re-added to the book of life if they repent of their sins and receive Jesus as their Savior.
5. If they commit grievous sin again, their name is blotted out again.
6. They can come back to Jesus for salvation again (and have their name re-added to the book of life again), if they repent (Seek forgiveness with Jesus), as long as they never denied Jesus as their Savior (after having had the Spirit).
James 5:19-20 and the Parable of the Prodigal Son (See Luke 15) show us that you can go from a saved state, and then to an unsaved state, and then back again (to being saved).