Would it be possible to damage the XS Board by leaving an external cicuit connected (and possibly powered) before the FPGA is configured or while downloading a new configuration i.e. before putting the microcontroller and RAM pins into the high impedance state?
This should be OK because the FPGA pins are in a high-impedance state during the configuration process anyway.
Even if the trainer board is switched off, various pins on the XS40 would be shorted via common grounded switches etc.
This will be OK as long as none of the pins that are held high or low are involved in the configuration process (such as DIN, CCLK, /PROGRAM, etc.).
Also, would there be any problem if the XS board was switched off while the external circuit was still powered?
This might be a problem if there are protection diodes on the FPGA pins: any logic high from the external circuit would be dragged low to the grounded Vcc of the FPGA through the diode.