2007 With regard to God, there is no strict right to any merit on the part of man. Between God and us there is an immeasurable inequality, for we have received everything from him, our Creator.
2008 The merit of man before God in the Christian life arises from the fact that God has freely chosen to associate man with the work of his grace. The fatherly action of God is first on his own initiative, and then follows man’s free acting through his collaboration, so that the merit of good works is to be attributed in the first place to the grace of God, then to the faithful. Man’s merit, moreover, itself is due to God, for his good actions proceed in Christ, from the predispositions and assistance given by the Holy Spirit. 2009 Filial adoption, in making us partakers by grace in the divine nature, can bestow true merit on us as a result of God’s gratuitous justice. This is our right by grace, the full right of love, making us “co-heirs” with Christ and worthy of obtaining “the promised inheritance of eternal life.” 60 The merits of our good works are gifts of the divine goodness. 61 “Grace has gone before us; now we are given what is due… Our merits are God’s gifts.” 62
2010 Since the initiative belongs to God in the order of grace, no one can merit the initial grace of forgiveness and justification, at the beginning of conversion. Moved by the Holy Spirit and by charity, we can then merit for ourselves and for others the graces needed for our sanctification, for the increase of grace and charity, and for the attainment of eternal life. Even temporal goods like health and friendship can be merited in accordance with God’s wisdom. These graces and goods are the object of Christian prayer. Prayer attends to the grace we need for meritorious actions.
It seems the Catechisim (CC) is saying that we cannot merit anything for ourselves in paragraph 2007 but then we can in 2010.
I am comparing this to the Westminster Confession of Faith (WCF) Chapter 16 III:
SECTION III. Their ability to do good works is not at all of themselves, but wholly from the Spirit of Christ. And that they may be enabled thereunto, beside the graces they have already received, there is required an actual influence of the same Holy Spirit, to work in them to will, and to do, of his good pleasure: yet are they not hereupon to grow negligent, as if they were not bound to perform any duty unless upon a special motion of the Spirit; but they ought to be diligent in stirring up the grace of God that is in them.
Oddly enough I think the WCF is clarifying the CCC.