Freewheeling diode position
Yes, you need the diode. It should be mounted reverse-bias directly across the solenoid coil if possible. This minimizes the current loop of the coil discharge path. Otherwise, in a position that places it closest to the coil.

Why is it helpful to minimize the current loop for the flyback diode? The spike that a large solenoid can generate is considerable. Even if it is suppressed on the origin controller, the field wiring loop is still carrying that high-energy current from the coil to the diode and back. This high-current transient can couple onto adjacent circuits, such as sensors and comms from other systems.

Mounting the diode on the coil does introduce a couple requirements: the coil lead needs to be polarized, and if there is field wiring involved, it needs to be checked with a voltmeter prior to powering up the controller. (One of my first jobs was with Honeywell, and I did exactly this for solenoid hookups as part of system bring-up. I fixed lots of electrician goofs.)

If ensuring wiring polarity is a problem, there is another solution: mount an R-C snubber across the coil like would be used for an AC supply. It’s not quite as effective as the diode, but it can work. (Maybe do that as well as the PCB-mounted diode.)