You can define $\mathfrak{m}_R := \{x  ~|~ \forall y : 1 - xy \in R^*\}$. Then a homomorphism $R \to S$ of local rings is a map which is compatible with the ring structure and maps $\mathfrak{m}_R$ maps into $\mathfrak{m}_S$. However, this is *not* equivalent to the usual condition that images of non-units are non-units: In general it is not true that $R = R^* \cup \mathfrak{m}_R$. This is proven by Thierry Coquand in [a remark about the theory of local rings][1]. The counterexample is as follows: Consider the Zariski topos $C$ over $\mathbb{Z}$ and the structure sheaf $\mathcal{O}$ of $\mathrm{Spec}(\mathbb{Z})$. Then $\mathcal{O}$ is a local ring in $C$, one verifies that $\mathfrak{m}=\{0\}$ on global sections, so that in particular $2 \in \mathcal{O}^* \vee 2 \in \mathfrak{m}$ is not satisfied.


  [1]: http://www.cse.chalmers.se/~coquand/local.pdf