I am wondering if there are no impediments to a marriage. Can the Priest deny the couple from getting married in the church after hearing a confession?
The priest cannot deny anyone anything on the basis of confession.
Code of Canon Law:
Can. 983 §1. The sacramental seal is inviolable; therefore it is absolutely forbidden for a confessor to betray in any way a penitent in words or in any manner and for any reason.
Can. 984 §1. A confessor is prohibited completely from using knowledge acquired from confession to the detriment of the penitent even when any danger of revelation is excluded.
If the person confesses to the priest something that would violate the Church’s understanding of marriage the priest might tell the person that he/she shouldn’t get married but if the person ignores the priest and attempts to get married anyways there is nothing the priest can do to stop it based on the confession.