LM317 not regulating higher voltages
The problem really is about not using capacitors. And possibly using the breadboard makes things worse.
The datasheet specifically mentions that if the input leads are longer than 6 inches (15cm), the input capacitor is recommended.
The datasheet also mentions the device is stable wihtout any output capacitor, except that there is excessive ringing when the output capacitance is between 0.5 nF and 5 nF, so the breadboard can make things worse.
So it is possible that the output is actually wildly oscillating, but your meter simply reports back a DC voltage value so you don't see the instability and oscillation.