Can a 9x3 front derailleur fit on a 7x3 configuration?
Yes. A front derailleur marketed as for a 9 speed system will work normally with your 7 speed set up. Really the front derailleur doesn't care how many cogs are in the back.  Generally, using a front drive system designed and marketed for &quot;X&quot;-speed systems will work in an &quot;X+/-1&quot; system.  For example, I use 10 speed crankset in combination with a 9 speed rear drive.  In addition mixing brands of shifter and front derailleur is possible (a SRAM front shifter can be paired with a Shimano front der and vice-versa) resulting in normal performance.  This does not hold true for the rear drive, where brand of shifter and derailleur must match to have normal performance.
Considerations should be given to the cable routing of your bike: does the front derailleur cable approach the der from the top? Or from the bottom?  Front derailleur's are designed to be actuated either by cable pulling from above (top-pull) or from below it (bottom-pull). Which type you require is based on your bike's designed cable routing.  Many front ders these days are termed &quot;dual-pull&quot; and are actuated from either a top pull or bottom pull cabling.  The bike determines this requirement.
Related to this is how the front derailleur mounts to the bike. Most commonly a clamp band is used around the seat tube and this serves as a mount point and by virtue of the design is manipulated to get the derailleur in proper alignment with the chainrings. A bicycle will be built utilizing one of three different sizes of seat tube diameter, the front derailleur must have the correct size clamp band (or come with shims allowing proper fitting).  There are other mounting designs of front ders too.
When a front derailleur is chosen for a particular front drive of a bike, a few important specs must be adhered to achieve nominal performance.  The number of teeth of the largest chainring and the difference in the number of teeth between the largest and middle chainring.  Both of these should match the specs of the front derailleur.
One further thought related to your question and desire to upgrade some componentry. Seven, eight, and nine speed hardware can be considered the same in regards to &quot;speed.&quot;  Their derailleur's actuation ratio are the same, meaning the derailleur will move the correct amount to move the chain the correct amount to achieve the correct shift distance whether the shifter is 7, 8 or 9 speed. The right numbered shifter should be used with the same number of cogs.