Usage of GF(p^m) fields, where p != 2 $GF(2^m)$ Galois fields are widely used in different cryptographic algorithms, for example, in Rijndael.

However, $GF(p^m)$ fields are possible with any prime $p$, not only 2, but $GF(2^m)$ fields are, as Wikipedia puts it, "especially popular choices for applications", because arithmetic operations in $GF(2^m)$ are much easier to implement that, say, in $GF(5^m)$: polynomials in the former can be expressed as simple binary numbers, and addition and subtraction are simply bitwise $xor$, which gives a great performance boost.

The question is: are there any cases where a $GF(p^m)$ with $p \neq 2$ would be preffered over a $GF(2^m)$ field? Or do such fields have only theoretical value?

I'm asking this because part of my cryptography homework involves calculations with such fields, and the last two tasks are to calculate a message encrypted with ElGamal, and to calculate an ElGamal signature, using a $GF(31^3) = \mathbb Z_{31}[x]/(29*x^3+14)$ field. Is this an example of a practice that has some benefits (besides the "security through obscurity" principle)?
Yes, cryptosystems like ElGamal or Shnorr based on the intractability
of Dlog Problem are are indicated to be implemented on finite field,
which is not the case of the RSA for which a model was proposed in the
early $80^{ies}$, and immediatly broken. As you know, a finite field is denoted by $GF(q)$ where $q=p^m$ and p would be any Prime. But in the case there is no special advantage to use such q with $p\neq 2$, because the arithmetic on this field is a bit more complicated, and each party would beforehand agree on using the same irreducible polynomial for building the corresponding splitting field.

However, other applications could use these fields for specific attacks, as the MOV attack which was introduced to reduce the Dlog Problem on supersingular curves.