We cannot attain sinless perfection while in the flesh,and we have a struggle between good and evil,but we can abstain from sin by the Spirit,but we still have the ability to sin if we want to sin.
If someone sins they are not of the devil,for all sin can be forgiven,for if we could not sin after receiving the Spirit or we would be lost,who would make it.
It is not doing a sin,and then giving it up and honestly meaning it,but it is holding unto sin and not letting it go,that is the problem.
If someone fornicates and then give it up,and honestly means it,and God knows the heart,it can be forgiven and off their record,and not a child of God,for they sinned,and let it go,but if they sin and fornicate,ask for forgiveness for doing the act,but not let it go knowing they will do it again,then they are in trouble,and the Bible says they would look for judgment upon them that would be sorer punishment than they received in the Old Testament.
A person can sin,and give it up,and mean it,and the sin is off their record,but they cannot hold unto a sin and not give it up,for then it is on their record,which is why the Bible says if we sin willfully after receiving the truth,there is no more sacrifice for sin,which means if you hold unto a sin,and will not let it go the blood of Christ cannot wash it away,for you will not give it up.
We can sin and not let it go for a year and still be forgiven for it,for anytime we mean it we do not want sin,and give it up,it is forgiven,but if we hold unto a sin and will not give it up,it cannot be forgiven,for how can you be forgiven when you will not let it go,which some have a form of godliness,but deny the power thereof,lovers of pleasures more than lovers of God,ever learning and never able to come to the truth that they have to be led of the Spirit,and abstain from sin,which when they cannot dwell with Jesus,He will say,you were workers of iniquity.
To tell the truth,for a person to honestly live for God by the Spirit,their time and resources would only be spent on whatever pertains to the kingdom of God,which is more strict than people realize,and God said whatever your right hand finds to do,do it with all your might.
It would be like a person living in isolation,a 1000 miles away from any person,and technology,having only shelter,and only thinking about the kingdom of God,and Jesus,and nothing else.
It is that strict,which if a person could not sin after receiving the Spirit,or they would be lost,who would make it.
We cannot attain sinless perfection because we are in the flesh,and have a war between good and evil,and the only way we can attain to sinless perfection is to be separated from the flesh,and be with Jesus,but we can abstain from sin by the Spirit,but we will still be tempted to sin,and if we do sin it can be forgiven if we honestly give it up not wanting it.
As long as there is a war of good and evil that we battle we cannot attain sinless perfection,for sinless perfection does not have that battle,but can only do good with no alternative to do evil.When we are with Jesus we will only do good with no alternative to do evil,but not on this earth in the flesh,and there is no good thing that dwells in the flesh.
Gal 2:11 But when Peter was come to Antioch, I withstood him to the face, because he was to be blamed.
Gal 2:12 For before that certain came from James, he did eat with the Gentiles: but when they were come, he withdrew and separated himself, fearing them which were of the circumcision.
Gal 2:13 And the other Jews dissembled likewise with him; insomuch that Barnabas also was carried away with their dissimulation.
Gal 2:14 But when I saw that they walked not uprightly according to the truth of the gospel, I said unto Peter before them all, If thou, being a Jew, livest after the manner of Gentiles, and not as do the Jews, why compellest thou the Gentiles to live as do the Jews?
Rev 21:14 And the wall of the city had twelve foundations, and in them the names of the twelve apostles of the Lamb.
This is Peter who was given the keys to the kingdom having a problem for like 14 years of not walking uprightly according to the truth of the Gospel,but we know Peter is saved,because His name is written on a foundation of the wall at the New Jerusalem,as well as all the apostles.
If it can happen to Peter,it can happen to someone else,and Peter did have the Spirit,but Peter let go of any sin that he did,and was forgiven,as well as all saints that have the Spirit.