If you assume choice, nothing changes. The standard argument to prove that every set is well-orderable, and therefore in bijection with an ordinal, still applies. It follows that we can still define cardinals as before: A cardinal $\kappa$ is an initial ordinal, that is, an ordinal not in bijection with any of its elements.
(The one caution you need is that ordinals need to be defined as transitive sets well-ordered by $\in$. With foundation, we can relax the well-orderability condition and simply require that they are linearly ordered by $\in$.)
Without choice things become more interesting. This question, my answer, and the comments there, address what happens. The point is that without choice not every set is in bijection with an ordinal, so cardinals must be defined differently. The standard approach is to simply say that two sets have the same cardinal iff they are in bijection with one another. We could then say that the cardinality of $A$ is the collection of all sets $B$ in bijection with $A$, and that a cardinal is the cardinality of a set. The problem is that cardinalities are proper classes (unless $A=\emptyset$). We fix this issue by invoking Scott's trick, that replaces a proper class with its elements of smallest rank. This gives us a set but, of course, uses foundation. The question I linked asks what happens if we have no foundation. Can we still do a sort of Scott's trick? As I point out there, this is not possible if on top of no choice and no foundation we allow a proper class of atoms.
If we assume Aczel's $\mathsf{AFA}$ axiom instead of foundation, then we can still do Scott's trick, that is, replace each class with a subset, so we have a (more or less) canonical way of representing cardinals as sets. Details are in the link.
In the comments, a different problem is addressed, namely (still assuming foundation, but no choice), we now require that the cardinal of a set $A$ is a set in bijection with $A$. Pincus showed that it is consistent that this is possible, and it is also consistent that it is not possible.
Finally, as you can see, there is still some room there for improvements, and any additional remarks that apply to that question (without foundation or choice, under such-and-such assumption, we have a version of Scott's trick) could be immediately applied to a version of your question as well (without foundation or choice, under such-and-such assumption, we can define cardinals as sets via the new version of Scott's trick).