Yes. Instead of taking the kernel you can take the kernel pair. In general, the kernel pair of a morphism is an attempt to recover a universal equivalence relation compatible with that morphism. If $f : R \to S$ is a morphism, then the kernel pair of $f$ is the pullback of the diagram $R \xrightarrow{f} S \xleftarrow{f} R$. In the case of rings, if $f$ has kernel $I$ then this is the ring
$$\{ (r_1, r_2) \in R \times R : r_1 \equiv r_2 \bmod I \}.$$
This sort of object is called a congruence in universal algebra, and should be thought of as an equivalence relation internal to the category of rings. One way to state one of the isomorphism theorems is that $f$ is surjective iff it is the coequalizer of the two projections from its kernel pair to $R$, or equivalently iff it is an effective epimorphism.
For groups, abelian groups, and rings, the ability to take inverses (in the third case, for addition) turns out to imply that you can replace the study of kernel pairs with the study of kernels (in the third case, at the price of leaving the category, as you noticed). But when you can't do this you really need to look at kernel pairs; for example if you start studying monoids or semirings.
See this blog post for a non-categorical introduction to the idea of internal equivalence relations and these three posts for variations on the relationship between kernel and cokernel pairs and various flavors of monomorphism and epimorphism. For example, with no hypotheses on the category, a morphism is a monomorphism iff its kernel pair exists and is trivial and, dually, an epimorphism iff its cokernel pair (the kernel pair in the opposite category) exists and is trivial.
As hinted in the comments by Menezio the kernel a map $f\colon M\to N$ is the equalizer of $f$ and the trivial map $0$. This is a natural requirement as we expect from the kernel that every element $x\in\ker f$ is taken to the $0$-element in $N$ after pre-composing with the inclusion $\iota\colon\ker f\to M$. Equivalently arrow-wise: we expect $f\circ\iota=0$, i.e. that pre-composing with $\iota$ equals the trivial map.
Now, the equaliser ${\rm eq}(f,0)$ consist of an object $\ker f$ and a map $\iota\colon\ker f\to M$ such that $f\circ\iota=0\circ\iota=0$ (as composing with the trivial map is always trivial) and is universal as such. That is, for every map $k\colon K\to M$ with $f\circ k=0~\circ k=0$ there exists an unqiue map $\tilde k\colon K\to\ker f$ such that $\iota\circ\tilde k=k$.
To put it otherwise: the kernel of a map $f\colon M\to N$ is universal among maps $g\colon K\to M$ such that $f\circ g=0$, which might sound like the more usual definition. Explicitly
The kernel of $f\colon M\to N$ is the unique par $(\ker f,\iota)$, where $\iota:\ker f\to M$ and $f\circ\iota=0$. This pair is universal in so far that for every $f\circ g=0$, with $g\colon K\to M$, there exists a unique $\tilde g\colon K\to\ker f$ such that $\iota\circ\tilde g=g$.
Best Answer
In general algebraic structures, the kernel of a homomorphism $f:X\to Y$ is defined just as for semigroups: $$\ker f:=\{(x, x') : f(x) =f(x')\}$$ which is always a congruence relation on $X$, i.e. an equivalence relation closed under the operations (meaning that it's a subalgebra of $X\times X$).
For groups [or rings or vector spaces, Boolean algebras, etc.], there is a one-to-one correspondence between congruence relations and normal subgroups [ideals, subspaces, Boolean ideals, etc], namely the equivalence class of the identity element [or, of $0$] already determines the whole relation.
In category theory, we can reflect this general notion of kernel by a kernel pair: a pair of arrows $k_1,k_2:K\to X$ (where $K$ plays the role of the congruence relation by the induced arrow $K\to X\times X$), which satisfy $f\circ k_1=f\circ k_2$, and whenever $f\circ u=f\circ v$ with $u,v:A\to X$, there's a unique $s:A\to K$ satisfying $u=k_1\circ s$ and $v=k_2\circ s$.