Below is extracted from page 8 of https://courses.maths.ox.ac.uk/node/view_material/44170:
I have an issue with the line: "It is easy to see that this means both terms on the RHS must vanish...". I.e. I don't see why the first term of the RHS can't just be the negative of the other.

Sketched proof:
Assume that $y$ is stationary so that LHS. of eq. (15) vanishes.
Start by considering $\eta$ that vanishes on the boundary. Then the first term on the RHS. of eq. (15) vanish. From the fundamental lemma of calculus of variations, it follows from that the Euler-Lagrange (EL) equations are satisfies on the open interval $]a,b[$, which by continuity can be extended to the closed interval $[a,b]$.
Consider next $\eta$ that not necessarily vanishes at $x=a$ but vanishes at $x=b$. However, the second term on the RHS. of eq. (15) is still zero, cf. part 2. Therefore the first term must vanish as well. This can only happen in $2$ ways:
There is a similar conclusion for the boundary condition at $x=b$. $\Box$