The axiom of choice for a category I am currently studying the counterpart of axiom of choice in ETCS which is the axiom that every surjective function has a right inverse.
In category of sets the surjective functions are epimorphsims however, in general categories not every epimorphism has a right inverse. An example of this is the category of partially ordered set. Every arrow in this category is an epimorphism and non identity arrows in this category does not have a right inverse.
I recently saw in an article that we can reformulate the axiom of choice in any category as the following statement:
$\bf{The\ Axiom\ of\ Choice\ for\ a\ Category}$: every epimorphism is split.
The definition i am using for a split epimorphism is as follow:
A ${split\ epimorphism}$ is a morphism $f: X \rightarrow Y$ where there exists a morphism $g : Y \rightarrow X$ such that the composite of $f$ and $g$ is the identity morphism.
But how can the axiom of choice for a category be true when we can prove that not every epimorphism had a right inverse?
 A: All that means is that the Axiom of Choice is not true for every category. It is true for $\bf Set$ and $\bf Vect_{\Bbb F}$, assuming that we work in $\sf ZFC$, but is provably not true for $\bf Ab,Top$, etc.
The key point is that you want the splitting to occur internally. So whereas $\Bbb Q$ maps onto $\Bbb{Q/Z}$, as groups, no splitting of that epimorphism is a group homomorphism: every element of $\Bbb{Q/Z}$ has a finite order, whereas no element of $\Bbb Q$ has a finite order (except $0$).
Therefore, "The Axiom of Choice for $\bf Ab$" is false; but this has no bearing on whether or not a function in $\bf Set$ exists that splits that epimorphism. If we're only interested in a certain type of structure (i.e. a category), then whatever happens outside that structure is irrelevant.
A: As a footnote to Asaf's answer, note that $\mathsf{ETCS}$ is not supposed to be true in every category - it's a set of axioms intended to describe the category Sets specifically (remember that it stands for elementary theory of the category of sets).
The idea of categories as possible "universes" for mathematics is an important one, but it needs to be treated carefully. Not every category results in an interesting mathematical universe. The system $\mathsf{ETCS}$ pins down a particular class of categories (= those categories in which the $\mathsf{ETCS}$ axioms, appropriately interpreted, are true) which provide interesting mathematical universes. If the $\mathsf{ETCS}$ axioms held in every category, they wouldn't be able to implement much mathematics - because they wouldn't be able to rule out "uninteresting" categories.
