Spot on Katana. A diode does all of the above. A Zener diode is slightly different, don’t confuse the two but most bikes have normal diodes fitted.
On bike wiring they are often used to stop current flowing in a certain direction and can often be fitted when adding to circuits. For an example of a practical use, if fitting an aftermarket alarm you could wire the output from the alarm module to your bike’s horn. The oil pressure light could come on at the same time as the horn because they share the same wires. To stop the current from flowing to the oil pressure light, you would use a diode. This enables both circuits to function as before.