Confusion about the Hamel Basis
Your definitions of "linearly independent", "basis", and "orthonormal basis" are all correct. In particular, an orthonormal basis for an infinite-dimensional Hilbert space is not actually a basis (since you will need to use infinite linear combinations).
"Hamel basis" means exactly the same thing as "basis". The reason that it is given a different name is to emphasize that you are talking about a basis with respect to finite linear combinations, as opposed to some other kind of object that might be referred to using the word "basis" but which is not actually a basis (such as an orthonormal basis or a Schauder basis). Indeed, when talking about infinite-dimensional topological vector spaces, it is rare that you actually care about a basis as opposed to some related notion that allows for infinite linear combinations. So in most contexts if someone refers to a "basis" of such a space, it is actually more likely than not that they are abusing terminology and are using "basis" as an abbreviation for "orthonormal basis" or something similar. To make it clear that you literally mean just a basis, it is common to say "Hamel basis".
As for your book's definition, note that "maximal" means "cannot be enlarged to a superset", not "cannot be enlarged in cardinality". So a "maximal linearly independent set" is a linearly independent set $S$ such that there is no proper superset $T$ of $S$ which is linearly independent. This is equivalent to saying $S$ spans the whole space (using finite linear combinations). Indeed, if $S$ does not span the whole space, you can take any vector not in its span and add it to $S$ to get a larger linearly independent set. Conversely, if $S$ does span the whole space, any vector not in $S$ is a linear combination of elements of $S$ and thus would give a linearly dependent set if you added it to $S$.
I take this to mean that $S$ is a Hamel basis if $S$ is linearly independent, and there is no linearly independent set $T$ for which $|T|>|S|$. That is a flaw in your "Hamel basis definition 1".
That is wrong. Instead of $|T|>|S|$ you should say $T\supsetneq S.$ That would be equivalent if $S$ is finite, but you cannot assume that here.
On the other hand, this article defines (on page 6) a "Hamel basis" to be a basis in which "we do not allow infinite sums" (i.e. in which every element can be expressed as a finite linear combination of basis vectors).
Exactly. That's the definition of linear independence.
Also, the distinction they make between an orthonormal basis and a Hamel basis makes me think that an orthonormal basis does allow infinite sums, but their definition of "basis" on the first page requires finite linear combinations as well.
Right. An orthonormal basis of an infinite-dimensional Hilbert space is not a Hamel basis. It's not big enough to be a Hamel basis.
There are infinite-dimensional inner product spaces in which an orthonormal basis is a Hamel basis, but they are not Hilbert spaces because they are not complete. The set of all finite linear combinations of an orthonormal basis is such a space. The set of all trigonometric polynomials with the usual inner product is one concrete example.