Shimano 105 RD-5501 on a six speed freewheel?
Friction shifters do not care what kind of derailleur is at the other end and do not care about the number of speeds on your cassette or freewheel; they just pull the cable. So long as the shifter can pull enough cable to move the derailleur the appropriate range, everything is fine between the shifter and derailleur. 

So there's no compatibility issue with the shifter and the derailleur to be concerned about. 

The derailleur just needs to be able to move the range of the cassette/freewheel and clear it (depends on the maximum number of teeth, also how much chain it needs to take up depending on which chainrings/cogs you're in). A 6 speed freewheel should be fine; if you are to buy a new freewheel, in most cases a 7 speed freewheel would be the way to go; you may have to put a washer on for it to fit (but if you find a new 6 speed freewheel and want it for some reason, that's your choice). 

Edit: As Nathan points out in the comments, make sure to use a 9 speed chain (which should work with a 7 speed freewheel); the derailleur cage narrows as the # of speeds goes up, so you need a narrow enough chain.