Cardinals can belong to one of three orders:
What were the ranks of Cardinals Richelieu and Mazarin?
At the moment of his election (1641), it seems that Mazarin was in minor orders - so called "lay cardinal". After that, there seems to be little consensus and pretty much no primary sources, but if anything, he was a cardinal-priest.
By the process of elimination, he was a cardinal-priest:
He was definitely not a cardinal-deacon. From "The Cardinals of the Holy Roman Church - Biographical Dictionary"
Cardinalate. Created cardinal in the consistory of December 16, 1641; never received the red hat and the title or deaconry.
He was also not a cardinal-bishop.
From Wiki definition: "the title of cardinal bishop only means that the cardinal in question holds the title of one of the 'suburbicarian' sees — they include the Dean of the College of Cardinals".
There is no information of any see he held (and the Cardinals list above lists one for every other cardinal); and he explicitly turned down a bishopric offer from Richelieu:
Richelieu, in spite of his fondness and admiration for Mazarin, was loath to crown his career so early; he offered a bishopric worth 30,000 écus a year. Mazarin, who aspired to more, for his part, turned it aside amiably.
As a separate confirmation, "The Catholic encyclopedia: an international work of referenc..." edited by Charles George Herbermann in 1911 states:
M. Loiseleur, who has made a careful study of the problem, believes that Mazarin was never married; it is certain that he retained the title and insignia of a cardinal until his death; probably he was even a cardinal-priest, though he never visited Rome after his elevation to the purple and seems never to have received the hat. And in any case he held the title of Bishop of Metz from 1653 to 1658.
Another evidence is from http://www.gcatholic.com/hierarchy/data/cardU08.htm (the web site seems to be some sort of Catholic Encyclopedia, but can't say how authoritative it is). There, Mazarin is listed as:
former Cardinal-Priest with no Title assigned former Abbot Ordinary of Cluny (France) Born: 1602.07.14 (Italy) Ordained Priest: Created Cardinal: 1641.12.16 Cardinal-Priest with no Title assigned (1641.12.16 – 1661.03.09) Bishop of Metz (France) (1652 – 1658) Abbot Ordinary of Cluny (France) (1654 – 1661.03.09)
Another reference: http://www.csun.edu/~hcfll004/SV1644.html
"Cardinals not attending:" (SEDE VACANTE July 20, 1644—September 15, 1644)
Jules Raymond Mazarin (aged 44) Cardinal Priest without titulus (arrived too late).
Not sure what the primary source is for "Cardinal Priest" piece but the bibliography for that page lists:
For the Conclave of 1644, see Giuseppe de Novaes, Elementi della storia de' sommi pontefici da San Pietro sino al ... Pio Papa VII third edition, Volume 10 (Roma 1822) 6-10. Alexis Francois Artaud de Montor, Histoire des souverains pontifes V (Paris 1851) 375-390. F. Petruccelli della Gattina, Histoire diplomatique des conclaves III (Paris 1865), pp. 96-129. Hermann Conring (editor), De electione Vrbani IIX et Innocentii X Pontificum Commentarii historici duo (Helmestadii: Henningus Mullerus 1651). Ernesta Chinazzi, Sede vacante per la morte del papa Urbano VIII Barberini e conclave di Innocenzo X Pamfili (agosto-settembre 1644) (Roma, 1904).
Henri Coville, Étude sur Mazarin et ses démêlés avec le Pape Innocent X. 1644-1648 ( Paris: Champion 1914).
According to Cardinal Richelieu's Wikipedia page he was a cardinal priest until December 4, 1642, the day of his death. Mazarin is difficult to find specific information on. According to his Wikipedia page, Jules Mazarin succeeded Richelieu. Since I cannot find any information on which kind of cardinal Mazarin was, I can only assume that he was a cardinal priest as well, like his mentor, Richelieu. Since Richelieu was chief minister to the monarch of France, and Mazarin was also, I hypothesize with confidence that he was, in fact, a cardinal priest.