It depends on the era you are talking about.
In its earliest forms, the legionarys were always landowning citizens and the lower classes were generally excluded from service. (though there are events in history that required Rome to dip into the head count long before the reforms of Marius. Marius just made military eligibility for all classes the standard.)
In the early and high imperial periods (1st through early 3rd century AD), citizenship was still a prerequisite, but the idea of citizenship was far less exclusionary. In AD 212, the emperor Caracalla granted universal citizenship to all freeborn residents of the empire.
By the 4th century, the legions were becoming highly 'barbarized' by a mass influx of Germanic provincials, and the requirements for various social positioning of the legionary was watered down by necessity for new recruits.
To answer the original question, yes a person of slave parentage could become a legionary, but there were many circumstances that needed to be considered.