Your understanding of the Catholic doctrine of marriage is sufficiently off to invalidate your point.
In Catholicism, an unconsummated marriage is a perfectly valid marriage. It is not ratified, but it is valid. The Code of Canon Law, the law which governs the Roman Catholic Church, including marriage, says in Canon 1061,
|Canon 1061 §1. A valid marriage between the baptized is called ratum tantum if it has not been consummated; it is called ratum et consummatum if the spouses have performed between themselves in a human fashion a conjugal act which is suitable in itself for the procreation of offspring, to which marriage is ordered by its nature and by which the spouses become one flesh.
A non-consummated marriage can be dissolved; a consummated marriage may not be:
Dissolution of the Bond.
Canon 1141 A marriage that is ratum et consummatum can be dissolved by no human power and by no cause, except death.
Canon 1142 For a just cause, the Roman Pontiff can dissolve a non-consummated marriage:
- between baptized persons, or
- between a baptized party and a non-baptized party at the request of both parties, or
- of one of them, even if the other party is unwilling.
This is entirely different from a declaration of nullity, or annulment as it is popularly called.
This is a declaration that a marriage was never valid in the first place.
So to answer your question:
Yes, Joseph and Mary were in fact married. In fact, throughout history, marriages that were valid but deliberately unconsummated were called Josephite marriages.
[Related Web article]|[Relating Web article]