Man has the ability in a state of depravity.
John 7:17
If any man will do his will, he shall know of the doctrine, whether it be of God, or whether I speak of myself.
Luke 6:33
33 And if ye do good to them which do good to you, what thank have ye? for sinners also do even the same.
Siiners doing the same good. that's a choice. Presented with the gospel of Christ which is the power of God unto salvation to everyone that believes, a sinner may either reject or receive the gospel truth. Paul says the Corinthians received the gospel yet he had something to say about believing in vain, meaning they can for sure reject it. This belief cannot saved because it is just an empty belief perhaps just a historical belief.
1 Corinthians 15
King James Version
15 Moreover, brethren, I declare unto you the gospel which I preached unto you, which also ye have received, and wherein ye stand;
2 By which also ye are saved, if ye keep in memory what I preached unto you, unless ye have believed in vain.
3 For I delivered unto you first of all that which I also received, how that Christ died for our sins according to the scriptures;