I'm studying the Grassmann variables from Polchinski's string theory textbook appendix A. On page 342,
In order to follow the bosonic discussion as closely as possible, it is useful to define states that are formally eigenstates of $\hat\psi$ (the lowering operator):$$\hat\psi|\psi\rangle = |\psi\rangle \psi\tag{A.2.7b}$$
I don't quite understand why the definition is not written like $$\hat\psi|\psi\rangle = \psi|\psi\rangle$$ instead. I learned that those Grassmann variables are used to describe fermions, but how does this ordering reflect the anticommuting property of fermions?
Since the Grassman number anticommutes, both with other Grassman numbers, as well as with fermionic states (by definition), that means there can be a difference between $|\psi\rangle\psi$ and $\psi|\psi\rangle$. The difference can be a factor of -1 if the state $|\psi\rangle$ is fermionic (e.g., the $|1\rangle$ state, but not the $|0\rangle$ state).
Do we write the completeness relation
$$
\int|\psi\rangle d\psi\langle\psi| = 1\tag{A.2.12}
$$
for the same reason?
Yes. Moving the $d\psi$ around inside the integral flips the sign on some terms in the integral, so the definition needs to be written as above.
We can prove that A.2.12 holds in the manner suggested by Polchinski. First note that, for arbitrary $\psi'$ and $\psi''$ we have:
$$
\langle \psi' |\psi''\rangle = \psi' - \psi''\;.
$$
If we take matrix elements of the LHS of A.2.12 we see that the result is:
$$
\langle \psi' |
\int|\psi\rangle d\psi\langle\psi|
|\psi''\rangle
=\int (\psi' - \psi)d\psi(\psi - \psi'')
$$
$$
=\int d\psi (\psi - \psi')(\psi -\psi'')
=\frac{\partial}{\partial \psi} (0 - \psi\psi'' +\psi\psi' + \psi'\psi'')
$$
$$
=0 - \psi'' + \psi' + 0 = (\psi' - \psi'') = \langle \psi'|\psi''\rangle\;.
$$
Note also, there are other ways to write the completeness relation.
E.g., the linked reference defines the completeness relation as:
$$
\int d\psi d\bar{\psi}|\psi\rangle\langle\bar{\psi}| =
|0\rangle\langle 0|
+
|1\rangle\langle 1|\tag{1}
$$
So, we see that Grassman "integration" is somewhat different from integration of regular numbers--it is rather more of a formal definition.