When two Catholics marry each other, then yes it must be in Catholic form (before a priest and two witnesses) and the typical place this is celebrated is in the parish church.
When a Catholic marries a non Catholic, the Catholic must either marry in Catholic form or receive a dispensation from the bishop to marry in a non-Catholic ceremony. It can be done fairly easily.
There isn’t enough information regarding your parents marriage to comment on its validity or invalidity. And you should not make assumptions because you do not know the facts of their marriage nor any subsequent steps they may have taken privately to make it a valid marriage if it were not in the beginnning.
But regardless of whether your parents have a valid marriage or not, it has no bearing on you at all canonically. Whether or not you would be considered legitimate or illegitimate under canon law depends:
vatican.va/archive/ENG1104/__P43.HTM
Civilly you are certainly legitimate children of the marriage.
In no case should you use the pejorative term “bastard” which the church DOES NOT use.
It is not something you need trouble yourself with at all. If your mother is practicing or wants to practice the faith she should talk to her pastor about her situation. If you have not been invited into a conversation about this by your parents, this is not your business.
Canon law doesn’t currently have anything in it that would distinguish legitimate from what was called “defect of birth”. In days past it created an impediment to holy orders requiring a dispensation and this was mainly put in place due to priests and bishops having illegitimate children and then seeking to advance them within the church ecclesial ranks.