If the "priest" performing the wedding was not in communion with the local diocese or with the Holy See, then he is not a Catholic priest, has zero authority to perform said wedding, and is representing himself as a licit priest.
That is the problem.
Nuptials performed in Protestant churches get a blanket dispensation because they are not fraudulently representing themselves as Catholic churches.