This paper investigates an integrated sensing and communication system where the base station serves multiple downlink users, while employing a passive reconfigurable intelligent surface to detect small, noncooperative airborne targets. We propose a method to design the two-way beampattern of the RIS-assisted monostatic radar, which allows controlling the sidelobe levels in the presence of eavesdroppers, jammers, and other scattering objects and avoiding any radar interference to the users. To obtain more favorable system tradeoffs, we exploit the correlation of the target echoes over consecutive scans by resorting to a multi-frame radar detector, which includes a detector, a plot-extractor, and a track-before-detect processor. A numerical analysis is provided to verify the effectiveness of the proposed solutions and to assess the achievable tradeoffs. Our results show that, by increasing the number of scans processed by the radar detector (and therefore its implementation complexity), we can reduce the amount of power dedicated to the radar function while maintaining the same sensing performance (measured in terms of probability of target detection and root mean square error in the estimation of target position); this excess power can be reused to increase the user sum-rate.