Reformed Protestants (and, perhaps, some other Protestants) hold to a notion of human sinfulness that is usually labeled total depravity. What they mean by this is that literally no one does good. Ever. They usually appeal to Romans 3 (especially verse 12) in defense of their view.
The writer of Ecclesiastes (most likely Solomon) does not agree. As he writes in 7:20:
No one on earth is sufficiently upright to do good without ever sinning. (NJB)
This verse becomes unintelligible if the Reformed are correct about total depravity. Why? Because of the last prepositional phrase. If the Reformed were correct, the verse might read like this instead: “No one on earth is sufficiently upright to ever do good.” But that is not what Solomon says. The clear implication of what he wrote is that people can do good, but not so perfectly as never to sin at all (which, by the way, is the Catholic view). Solomon’s observation in Eccles. 7:20 demands that people must be able to do good at least some of the time.
Okay, so how do we reconcile this with Romans 3:12? Does St. Paul contradict Solomon? By no means. What the Reformed overlook is that St. Paul is quoting poetry: a psalm (14:1-3). And as is obvious from the rest of the psalms, David is making use of hyperbole in those verses of the fourteenth psalm. There are many places in the psalms that speak of “the righteous,” which would be impossible if literally no one ever does good (I leave the discovery of them as an exercise for the reader).
In short, Solomon writing in Ecclesiastes contradicts neither the psalmist nor the Apostle. Rather, the Reformed have erred when they say that literally no one does good. They have misinterpreted both the psalmist and St. Paul by reading Ps. 14:1-3 in a literalistic way.