Because a derailleur is called 10 spd doesn't mean it can only change the gears on a cassette with 10 cogs. It just means it has the range work with a cassette as deep as a 10 spd. The only thing that would have to be 6 spd. in your case would be indexed shifters - if you have indexed shifters. If you have friction-shifters, it will work regardless of how many gears are on the cassette/freewheel.