Is there a topological analogue for this result? 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.
 A: 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.
A: In metric spaces there is a notion of completion: if $(X,d)$ is a metric space, there is a complete metric space $(Y, d')$ such that 


*

*there is an isometry $i$ from $(X,d) \to (Y,d')$ such that $i[X]$ is dense in $Y$.

*for any uniformly continuous function $f:(X,d) \to (Z,\rho)$ where the latter is a complete metric space, there is a unique continuous  $f': (Y,d') \to (Z, \rho)$ such that $f' \circ i = f$.


It is a little like adding fractions to a domain, which you do to add inverses that aren't there yet. Here you're adding limits for Cauchy sequences that have no limit yet. Both are characterised by a universal mapping extension property.
As mentioned by @rschwieb compactifications are another example (adding limits for ultrafilters that do not yet converge).
