It should be ok because the rusty metal needs to be the -ve charged cathode and the sacrificial metal needs to be the +ve charged anode. Had the polarity been the other way round, the brass probably be dissolved by the electrolysis. However, just to be safe, it would be worth keeping a check on the condition of the brass to make sure nothing is happening to it!