Yes, you can work part-time while pursuing your full-time degree as an international student in Germany. The working days have a limit of 120 full work days or 240 half days of work. This policy of limited number of working days is applicable for voluntary work placements, irrespective of whether it is paid or unpaid.
In addition, while working the legally permitted number of days, the foreign students cannot be self-employed to work as freelancers.
If you are a student from member states of the EEA/EU, you can work till 20 hours per week while pursuing your full-time study program.