To directly answer the question, it is not possible to do this using the "*" / "yield" syntax. From here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/yield
...the "yield" keyword may only be used directly within the generator function that contains it. "It cannot be used within nested functions" such as callbacks.
The unhelpful answer to the OP's question of "why" is that it is prohibited by the ECMAScript language specification, at least in strict mode:
https://262.ecma-international.org/9.0/#sec-generator-abstract-operations
For more of an intuition of why: the implementation of a generator is that the "yield" keyword pauses execution of its generator function. The execution of the generator function is otherwise ordinary, and when it returns, the iterable that it generated ends. That signals to the caller that no more values are coming, and any loop waiting for it will also end. After that, there's no opportunity to yield anything to any interested caller, even if the nested callback runs again.
Although a callback or other nested function can bind variables from the outer generator, it could escape the generator's lifetime and be run any other time / place / context. This means the desired yield keyword may have no function to pause, and no caller or loop to yield a value to. I would speculate that the strict mode syntax error was put here to save code authors from having something silently undesirable happen.
That said, the generator syntax is not necessary to create the OP's desired effect. When the goal is just to get "next()" to work, or to participate in the async iterator protocol ("for await (...)"), those protocols can be conformed to using ordinary functions and objects, without need for yield. The protocol you want to conform to is documented here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols
...the other answer mentioning EventIterator is an example of helper code that makes this easier to do.
yield
from asetInterval
callback, for example? – Aurelio