I solved it the following way. I also put this solution in my thesis, so it ought to be correct :) I start by stating a Lemma from the theory of $p$-adic classification of quadratic forms.
$\newcommand{\ZZ}{\mathbb{Z}}$ Lemma: Every integral lattice is $p$-adically equivalent to a lattice with diagonal Gram matrix, if $p \neq 2$. For $p=2$ there is a $2$-adic equivalence to a lattice whose Gram matrix has either $1 \times 1$-blocks of the form $(2^{l}\varepsilon)$, $l \geq 0$, $\varepsilon$ a unit in $\ZZ/ 8\ZZ$, or $2 \times 2$-blocks of the form $ 2^{l} \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \quad\text{or}\quad 2^{l} \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix},\, l \geq 0 %\label{eqn:2-adicMatrices} \tag{M} $ on its diagonal. We get the (finite) $p$-adic orthogonal decomposition $ L \sim_{p} p^{0} L_{0} \perp p^{1} L_{1} \perp \ldots % \tag{2} $ into lattices $L_{i}$ with quadratic forms whose Gram determinants are not divisible by $p$.
For references, see [Co-Cl] (Thm. 2, p. 369), [Cas08] (Lem. 4.1, p. 117) and [Kit93] (pp. 76)
Proof of assertion from question: We use the theory of $p$-adic classification from the previous Lemma for $p=2$. Let $ L \sim_{2} 2^{0} L_{0} \perp 2^{1} L_{1} \perp \ldots $ be the $2$-adic decomposition of $L$. If $L_{0}$ is $0$, then the congruence \begin{equation} \tag{C} q(x) \equiv a \pmod 8 \end{equation} over $\ZZ_{2} / 2^{3} \ZZ_{2} = \ZZ/ 2^{3} \ZZ$ has no solutions as $q$ would only take even values, but $a \in (\ZZ / 8 ZZ)^{*}$. So suppose $L_{0}$ is non-trivial. If its Gram matrix contains a $1 \times 1$ block $(b)$, $b \in (\ZZ/ 8\ZZ)^{*}$ on its diagonal, let it w.l.o.g. be the first entry on the diagonal. Fixing the last $l-1$ coordinates of a vector $x \in (\ZZ/ 8\ZZ)^{l}$, the congruence (C) becomes the quadratic congruence (after multiplying with $b^{-1}$) $ x_{1} \equiv c \pmod 8 $ for some unknown constant $c(=b^{-1}(a-q((0,x_{2},\ldots,x_{l})))$. In the worst case that $c=1$, this congruence has the four units of $\ZZ/ 8\ZZ$ as solutions. This would yield the upper bound $8^{l-1}\cdot 4 = 8^{l}/2$ as stated in the question.
In the other two cases, that the Gram matrix of $L_{0}$ only contains the matrices (M) on its diagonal, there are even less solutions. This can be shown by some tedious calculations by cases. Fix the last $l-2$ coordinates of $x \in (\ZZ/ 8\ZZ)^{l}$. The congruence becomes now one of the two cases $\begin{eqnarray} 2 x_{1} x_{2} & \equiv & c \pmod 8, \tag{M1} \\ 2 ({x_{1}}^{2} + x_{1} x_{2} + {x_{2}}^{2}) & \equiv & c \pmod 8 \tag{M2} \end{eqnarray}$ again for some unknown constant $c$. Instead of doing the tedious calculations, one can also just issue the script
for M in [[0,1,0],[1,1,1]]: H = QuadraticForm(ZZ,2,M) for c in range(8): H.count_congruence_solutions(2,3,c,None,None)
in Sage (e.g, go to sagenb.org if you don't have a local installation), to find that the congruence (M1) has at most $20 < 8^{2}/2$ solutions and the second congruence (M2) has at most $12 < 8^{2}/2$ solutions.
References:
- [Co-Cl] John Conway, Neil J. A. Sloane. Sphere Packings, Lattices and Groups.
- [Cas08] J.W.S. Cassels. Rational Quadratic Forms.
- [Kit93] Yoshiyuki Kitaoka. Arithmetic of Quadratic Forms.