NO you cannot withold rent in this manner. If you have a dispute over security deposit then sue then in small claims