Surely one can get married in chuch if both parties are free to marry.
However, if OP had a civil ceremony and was married already, they could not legally marry in church, and instead could just have a celebratory event for family. E.g. it would look like a wedding and could be treated like a wedding to family. But in the eyes of law, no real paperwork is produced. In the eyes of law the civil ceremony is real marriage, and event in church isn't counted towards number of times married.
If OP lied to church and claimed unmarried when was married, got marriage license etc, then second marriage is not valid either and civil marriage is still the real marriage.