Windows 7 is less extensive on resources over Vista, so you'll have better luck running Windows 7 rather than Vista. Yes, you'll be able to run Windows 7 on your Pentium 4; my old Pentium 4 (2.8GHz Prescott and later a 3.06GHz Northwood) ran Windows 7 no problem.
However when installing Windows 7 on a Pentium 4, I also had 2GB RAM and a NVIDIA GeForce 6800; hence allowing Aero effects. So if you're going to run Windows 7, I'd recommend the maximum RAM your motherboard supports, or at least 2GB and a Nvidia 6000 series GPU or better. You don't need a GPU, but it will make your Windows 7 experience more smoother.
Also from my view point, personally I think you'd far better from a new system, even if it's a cheap build with no GPU. Pentium 4's are weak and have a high TDP. If you buy a cheap motherboard, let's say a used socket 1155 and a cheap Sandy/Ivy Bridge Pentium processor, you'll easily run Windows 7 without a graphics card, whilst having Aero effects. Pentium 4's are ancient and they were first released in 2000, we have come a long way since then. You can even go AMD with APU if you want a cheap upgrade. This whole paragraph is simply my view on Pentium 4's.
Regardless, all the best.