A droplet bouncing on a liquid bath can self-propel due to its interaction with the waves it generates. The resulting "walker" is a dynamical association where, at a macroscopic scale, a particle (the droplet) is driven by a pilot-wave field. A specificity of this system is that the wave field itself results from the superposition of the waves generated at the points of space recently visited by the particle. It thus contains a memory of the past trajectory of the particle. Here, we investigate the response of this object to forces orthogonal to its motion. We find that the resulting closed orbits present a spontaneous quantization. This is observed only when the memory of the system is long enough for the particle to interact with the wave sources distributed along the whole orbit. An additional force then limits the possible orbits to a discrete set. The wave-sustained path memory is thus demonstrated to generate a quantization of angular momentum. Because a quantum-like uncertainty was also observed recently in these systems, the nonlocality generated by path memory opens new perspectives.