You probably won't need to change the ballasts or anything. Just cut it down to size and move the fittings. The 3 foot tubes will be overdriven a bit, the 4 foot ballasts usually put out a bit over 100 volts, 3 foots will be less. Just means the tubes may need replaced more often but will be brighter.
Of course, 3 foot ballasts should be cheap and easy to replace.