From the construction of a field of fractions of a commutative domain, we have the following:
Let $D$ be a commutative domain and $F$ be its field of fractions. Then every monomorphism of $D$ into a field $K$ has a unique extension to a monomorphism of $F$ into $K$.
This sounds very much like something which has its analogue in topology, so I would like to know if an analogous thing exists in topology and what it is.
You mean like the Stone-Čech compactification of a space? Every continuous function of the space into a compact Hausdorff space extends to one on the entire compactification.
There are lots of examples like this: you should look up more examples of universal properties.