I know this definition of almost everywhere convergence:
If $f_n$ and $f$ are measurable functions defined on a measure space $(S,\Sigma,\mu)$, we say that $f_n$ converges to $f$ almost everywhere (a.e.) if there exists a set $E\in\Sigma$ with $\mu(E)=0$ such that $f_n(x)\rightarrow f(x)$ for all $x\in S\setminus E$.
My questions
Do we really want the functions be measurable?
Or, do we only need a measure on $S$ that can be associated with sets and then we would be fine?
If we do not consider measurable functions though, how do we define convergence?
The functions $f_n,f$ do not need to be measurable.
But a measure space $(S,\Sigma,\mu)$ is necessary because a measure $\mu$ is only defined on some σ-algebra $\Sigma$ on a set $S.$
$f_n\to f$ $\mu$-a.e. iff there exists a set $E\in\Sigma$ such that $\mu(E)=0$ and $\forall x\in S\setminus E\quad f_n(x)\to f(x).$
So, you don't need that the set $\{x\in S\mid f_n(x)\to f(x)\}$ belongs to $\Sigma:$ you only need it to be a subset of some element of $\Sigma$ of $\mu$-measure $0$ (i.e. you only need it to be an element of $\tilde\Sigma$ of $\tilde\mu$-measure $0,$ where $\tilde{}$ refers to the completion).