Is the cancellation law - group relationship a bi-implication? In my textbook there's a theorem that says that given a group, both cancellation laws hold. But if I have a finite set such that both cancellation laws hold, does it follow that the set is a group?
 A: Here's one way to construct lots of nonassociative (hence not groups!) binary operations on finite sets which are cancellative:
Fix an odd positive integer $n$. In the group $C_n$ of integers modulo $n$ under addition, "division by $2$" is total and well-defined in the sense that for all $x$ there is exactly one $y$ with $y+y=x$. This lets us define, on the set $\{0,1,...,n-1\}$, the following "average" operation: $a\star b$ is the unique $c$ such that $c+c=a+b$.
The operation $\star$ is clearly cancellative (this is a good exercise) but in general is non-associative. For example, working in $C_5$ we have $$(1\star 3)\star 4=2\star 4=3$$ but $$1\star (3\star 4)=1\star 1=1.$$
Non-associative algebraic structures are less broadly known but are widely studied still; there is, for example, quite a lot of literature on finite loops (and related structures) that you might be interested in.
A: The multiplication in a group also needs to be associative, and as Noah has shown there are many non-associative binary operations, even cancellative ones. Another easy example is the operation $(a, b) \mapsto a - b$ on the cyclic group $C_n$ (constructed, for example, as the integers $\bmod n$). On the other hand, we have the following:

Claim: If $G$ is a finite set and $m : G \times G \to G$ is an associative cancellative operation, then $(G, m)$ is a group; in particular, $G$ has an identity and inverses.

Proof. We'll write the multiplication as concatenation as usual. Let $g \in G$ be any element. Since $G$ is finite, by the pigeonhole principle, there are positive integers $m > n$ such that $g^m = g^n$. Set $e = g^{m-n}$. We want to show that $e$ is an identity, meaning that $eh = he = h$ for any $h \in G$. To see this, we have that $g^m = g^n$ implies
$$g^n e h = g^n h$$
for any $h$, and cancelling $g^n$ gives $eh = h$; similarly for right multiplication.
Now set $g' = g^{m-n-1}$. Then $g g' = g' g = g^{m-n} = e$, so $g'$ is the inverse of $g$. Since $g$ was arbitrary, inverses exist, so $G$ is a group. $\Box$
The finiteness of $G$ is essential here for the pigeonhole argument to work, and this argument fails for infinite $G$. For example, $+ : \mathbb{N} \times \mathbb{N} \to \mathbb{N}$ is associative and cancellative but does not have inverses (or an identity depending on whether you take $\mathbb{N}$ to include $0$).
