Here is a partial answer: The Kervaire-Laudenbach Conjecture states that, for any group $A$, $(A\ast\mathbb{Z})/\operatorname{ncl}(w)$ is non-trivial. This was proven by Klyachko for torsion free groups $A$; see Fenn and Rourke, Klyachko's methods and the solution of equations over torsion-free groups, Enseign. Math. (2) 42 (1996), no. 1-2, 49–74 (doi). Hence:
There are no counter-examples for $A$ torsion-free and $B\cong Z$.
This can be easily generalised: A group is indicable if it surjects onto $\mathbb{Z}$. If $B$ is indicable, so $\phi:B\twoheadrightarrow\mathbb{Z}$, then the map $\phi$ induces a map $\overline{\phi}:(A\ast B)/\operatorname{ncl}(w)\twoheadrightarrow(A\ast\mathbb{Z})/\operatorname{ncl}(u)$ for some word $u\in A\ast\mathbb{Z}$. By Klyachko's theorem, we know the image is non-trivial so we immediately have:
There are no counter-examples for $A$ torsion-free and $B$ indicable.
Klyachko's proof is really pretty, based on a "funny property" of spheres which "is so simple and funny" that, he claims, it could be included in a collection of puzzles or suggested as a problem for a school mathematical tournament. He phrased it in terms of car crashes, and you can find a MathOverflow discussion on it here. The paper of Fenn and Rourke I cited above is the best place to read about it though.
Added later: I asked Jim Howie if he knew what the status of this problem is, and he said he thought it open and very difficult (so there are no known counter-examples).
He also pointed to two papers of his - one with Brodskii from 1993, and the other with Edjvet from 2021. These prove that when $A,B$ are torsion-free, then they embed into $(A*B)/\operatorname{ncl}(w)$ if $w$ has free product length $\le 6$ (first paper) and $\le 8$ (second paper). These are innocuous-sounding results, but the one extra step took ~28 years, and both took quite a bit of work to prove.
Embedding results like these are typically referred to as Freiheitssatz and seem to be the main approach to problems of this form. For example the main result of Klyachko's paper is a Freiheitssatz for when $w$ has a specific form; the other cases follow from an easy observation. A Freiheitssatz is a priori stronger than a non-triviality result would be, however Jim points out that it is not clear how much stronger.
The papers are:
S. D. Brodskii and J. Howie, One-relator products of torsion-free groups, Glasgow Math. J. 35 (1993) 99-104 (doi).
M. Edjvet and J. Howie, On singular equations over torsion-free groups Internat. J. Algebra Comput. 31 (2021), 551-580 (doi, arXiv.