I'd bet you can. It has to be permanently attached and must make the barrel greater than 16". That's what federal regulations require. I believe if it is a removable brake you can't do it though.
My thought on this matter would be to buy a factory 24" barrel and have it cut down to 16 1/4" and have it re-crowned. I'm betting that it would cost much less plus I don't care for brakes on handgun or rifle barrels.
Ranger413