Magma is computing the automorphism group of the associated **projective curve** $E$ defined over the base field (according to the link you gave). You are thinking of the automorphism group of $E$ **as an elliptic curve** i.e. with $\infty$ fixed.
The group magma is computing will also include the translations which are defined over the base, so there is a short exact sequence:

$$0 \rightarrow E(k) \rightarrow \mathrm{AutAsProjectiveCurve}(E,k) \rightarrow \mathrm{AutAsEllipticCurve}(E,k) \rightarrow 0.$$

Your curve has $4$ points defined over $\mathbf{F}_3$, but in fact only a subgroup of order $6$ of the order $12$ group $\mathrm{AutAsEllipticCurve}(E,\overline{\mathbf{F}}_3)$ of geometric automorphisms fixing $\infty$ are defined over $\mathbf{F}_3$. Thus $24 = 6 \cdot 4$ is the correct anser. The extra automorphism of the elliptic curve is defined over $\mathbf{F}_9 = \mathbf{F}_3[i]$. Also, we have $|E(\mathbf{F}_9)| = 16$, because the the zeta function is equal to

$$\frac{(1 + 3 T^2)}{(1-T)(1-3T)} = 1 + 4 T + 16 T^2 + \ldots = 1 + 4 T + \frac{1}{2} \left(\frac{4^2}{2} + 16\right) T^2 + \ldots $$

And indeed:

```
A<x,y> := AffineSpace(FiniteField(9),2);
f := y^2 - x^3 + x;
C := Curve(A,f);
G := AutomorphismGroup(C);
Order(G);
```

Gives the answer $192 = 12 \cdot 16$. This is also why magma will refuse to do the same computation over $\mathbf{Q}$ --- that would require computing all the rational points! To give some other examples, you can take a random elliptic curve with no automorphisms (as an elliptic curve) besides $\pm 1$ and compare the answer to the number of points modulo p:

```
A<x,y> := AffineSpace(FiniteField(41),2);
f := y^2 - (x^3 + x + 1);
C := Curve(A,f);
G := AutomorphismGroup(C);
Order(G);
```

returns $70$, and indeed $|A(\mathbf{F}_{41})| = 1 + 41 - (-7) = 35$, and $70 = 2 \cdot 35$.