The power to do evil is no part of the essence of freedom: God, the confirmed angels and the blessed cannot sin, yet are free
When freedom is placed in a certain indifference of acting, in the free agent's being able to act or not act, to do this or that, we must take great care not to read this as if it belonged to the essence of freedom that the free agent can do either good or evil.
Being able to do evil is no part of freedom's perfection. It is rather an imperfection that goes along with freedom in a created person, something accidental to it. God, the freest of all agents, cannot do evil. Neither can the holy angels, from the time God confirmed them in grace.
This is also the privilege of the blessed souls once admitted to the vision of God: they can never sin again. Yet that does not mean the holy angels or the blessed souls have lost their freedom.
Latin
XXXIII. Caeterum quando libertas constituitur in quadam agendi indifferentia, & in eo quod qui liber dicitur potest agere, vel non agere, hoc, aut illud agere, sedulo animadvertendum est quod istud ita accipi non debet, quasi ad essentiam libertatis pertineret, ut qui liber est possit bene, vel male agere. Nam posse male agere non est aliquid quod ad libertatis perfectionem pertineat, sed potius quaedam est imperfectio libertatem comitans in persona creata, & quae libertati accidentaria est. Nam Deus qui est omnium in agendo liberrimus male agere non potest: ut nec possunt sancti Angeli ex quo fuerunt a Deo in gratia confirmati. Et haec quoque praerogativa est Animarum Beatarum, quae ad Dei Visionem semel admissae fuerunt, ut amplius peccare non possint. Neque tamen propterea vel sancti Angeli, vel animae Beatae libertatem suam amiserunt.