The problem with your proof is that even though $$\int_{[a,b]\setminus A}|f(y)|\,\mathrm dy=0$$ by the definition of $A$, the quantity $$\int_{A}|f(y)|\,\mathrm dy=0$$ can also vanish if the set $A$ has measure zero for a generic measurable function $f$, despite the fact $|f|$ is strictly positive on $A$.
However, for continuous functions (which assumption you admittedly never used), if $A$ is non-empty, then it actually has positive measure, because if $|f(x)|$ is positive for some $x\in[a,b]$, then continuity forces it to be positive, too, on a sufficiently small non-degenerate interval containing $x$, which interval has positive measure. In this case, you do reach the desired contradiction.
Formally, suppose, for the sake of contradiction, that $f(x)\neq 0$ for some $x\in[a,b]$. Let $\varepsilon\equiv|f(x)|/2>0$ Since $|f|$ is continuous at $x$, there exists some $\delta>0$ such that if $$y\in[a,b]\text{ and }|y-x|<\delta\Rightarrow |f(y)-f(x)|<\varepsilon.$$ But then $$2\varepsilon=|f(x)|\leq|f(x)-f(y)|+|f(y)|<\varepsilon+|f(y)|,$$ so that $|f(y)|>\varepsilon$ whenever $y\in[a,b]\cap(x-\delta,x+\delta)$. Therefore, $$\int_{a}^{b}|f(y)|\,\mathrm dy\geq\int_{\max\{x-\delta,a\}}^{\min\{x+\delta,b\}}|f(y)|\mathrm dy\geq\big(\min\{x+\delta,b\}-\max\{x-\delta,a\}\big)\varepsilon\geq\min\{\delta,b-a\}\varepsilon>0,$$ which is a contradiction.
The penultimate inequality in the last formula follows from the fact that the quantity $$\big(\min\{x+\delta,b\}-\max\{x-\delta,a\}\big)$$ can take on at most four different values:
- $(x+\delta)-(x-\delta)=2\delta>\delta$;
- $(x+\delta)-a\geq(a+\delta)-a=\delta$;
- $b-(x-\delta)=b-x+\delta\geq b-b+\delta=\delta$; or
- $b-a$,
all of which are greater than or equal to $\min\{\delta,b-a\}>0$.
The tedious shenanigans with the min’s and max’s are required because the interval $(x-\delta,x+\delta)$ may extend beyond the limits of the interval $[a,b]$, for example if $x=a$ or $x=b$. Then, one needs to “trim” the interval $(x-\delta,x+\delta)$ and integrate only on the segment which falls into $[a,b]$.