You can use the "sprite #0 hit" feature to do it. This sets a flag when the PPU draws sprite #0 (first 4 bytes of sprite-RAM), but only when it overlaps a solid background tile.
In the NMI, you'd write zeros to the scroll register. So the top part of the screen will stay still.
Then you have to wait for the screen to reach sprite #0's location with code like this:
Code:
CheckSpr1:
lda $2002
and #$40
bne CheckSpr1
CheckSpr2:
lda $2002
and #$40
beq CheckSpr2
rts
Then after that code, write your horizontal scroll value to $2005 (don't write to $2006 at this point). It's a little tricker if you need to do vertical scrolling with a status bar on top.
But you can only do this once per frame. Your game has status info on the top and bottom, right? You might need to combine them, and put it all on top or bottom.
Some cartridges (like the one I've designed) are able to trigger an IRQ on specific scanlines. But it's good to not use that feature, unless it's really needed. Because it needs extra hardware on the cartridge to do it.
(Scanline is each horizontal line on the screen).