If you just use the battery input for powering the XIAO and not the USB then it should be fine to use the solar power without a diode.
Since both voltages lead into the same point (see VIN on the diagram attached) putting 3.7V on the USB C should be OK as well.