It is not necessary to say the act of contrition during confession in order to be validly absolved of your sins. The Code of Canon Law specifies: “To receive the salvific remedy of the sacrament of penance, a member of the Christian faithful must be disposed in such a way that, rejecting sins committed and having a purpose of amendment, the person is turned back to God” (CIC 987).
Saying the act aloud helps a priest know you are contrite or disposed to receive the sacrament, but he may not need to hear it in order to know you are truly sorry for your sins. He may instruct you to say the act of contrition after you have left the confessional or not say it at all.
Even if you are not instructed to do so, it is still prudent to say an act of contrition after receiving absolution in order to affirm your contrition (which can be as simple as saying, “Lord Jesus, Son of God have mercy on me, a sinner”) and to be in keeping with the Rite of Individual Penance that the Congregation for Divine Worship has released.