I need an electron gun for a project that I'm doing. Is it enough to merely send current through a filament in order to shoot our electrons (using thermionic emission) or must there be an anode present to attract the electrons?
Yes, we need an anode. But I would say the purpose of the anode is not only to attract the electrons emitted from the cathode, but also to recollect them to refill the cathode with electrons. Just after a tiny amount of electrons are emitted, the electric potential of the cathode would raise so much that no more electrons would be emitted until the cathode is refilled. In the steady state, the electric potential of the cathode remains low, making it a stable source of electrons. But the word "source" should not be misunderstood as something that creates electrons. It's just a place where the recollected and refilled electrons get emitted.
This is different from a light bulb radiating photons of light, where photons are created as packages of energy traveling at the speed of light. When these photons reach an absorption screen, they get annihilated and the energy they carry get absorbed by the screen and in the long run heats it up. So there's no recollection of those photons to put them back to the light bulb.
For a long time people had insisted on such difference between energy and matter. Nowadays we know that at high energies, electrons can also be created and annihilated in electron-positron pairs. But that is another topic.
here is another way of looking at this which may help answer your question. Think of the electron gun as a circuit element. it is in series with the (-) terminal of a power supply which generates high voltage and low current. for current to flow through the circuit, a return path must be provided by which the electrons shot by the gun at a target (the anode) flow back to the power supply and get lifted up to high voltage again. For circuits carrying extremely high voltage and correspondingly low current, a satisfactory return path may just be the ground beneath the apparatus, but for any circuit like this which carries significant current, an anode must be provided and it has to be wired to the (+) terminal of the power supply.