You are right Cameron, the only requirement for something to be a morphism is to have a domain and a codomanin.
In more detail, take the definition of category for ex. from Wikipedia:
There are many equivalent definitions of a category. One commonly used definition is as follows.
A category C consists of
a class ob(C) of objects
a class hom(C) of morphisms, or arrows, or maps, between the objects.
Each morphism f has a unique source object a and target object b where a and b are in ob(C). We write f: a → b, and we say "f is a morphism from a to b". We write hom(a, b) (or $hom_C(a, b)$ when there may be confusion about to which category hom(a, b) refers) to denote the hom-class of all morphisms from a to b. (Some authors write Mor(a, b) or simply C(a, b) instead.)
for every three objects a, b and c, a binary operation hom(a, b) × hom(b, c) → hom(a, c) called composition of morphisms; the composition of f : a → b and g : b → c is written as g ∘ f or gf. (Some authors use "diagrammatic order", writing f;g or fg.)
such that the following axioms hold:
(associativity) if f : a → b, g : b → c and h : c → d then h ∘ (g ∘ f) = (h ∘ g) ∘ f, and
(identity) for every object x, there exists a morphism 1x : x → x (some authors write idx) called the identity morphism for x, such that for every morphism f : a → b, we have 1b ∘ f = f = f ∘ 1a.
As you see there is nothing about the nature of the morphisms, in particular it does not say that they are functions and indeed in many noteworthy cases they are not functions.
The definition requires that each morphism have a domanin and a codomain. How is this obtained formally? Very simple (and some other sources make it explicit, eg Mac Lane ), you state that there are 2 functions - called dom and cod - that respectively associate to a morphism f its domain and codomain.
$$dom: hom(C)\to ob(C) $$
$$cod: hom(C)\to ob(C) $$
So dom(f) / cod(f) is the object which is the domain / codomain of f.
These are total functions, that means that they are defined on every morphism (every morphism has a domain and a codomain).
They are generally not injective functions (you may have 2 morphisms with the same domain and/or codomain).
They are surjective (given any object a, there is at least one morphism - called the identity morphism $Id_a$ - such that $dom (Id_a) =a$ and $cod (Id_a) =a$ ).