There is another 'B' in another octave later in the bar. With no 'accidental'. That says to me that the one on the middle line was probably B♮ in the previous bar (the other wasn't there at all).
So, it's probably a courtesy accidental, there to remind the reader that the barline has actually done its job of cancelling the prior natural on B. It really ought to have brackets round - (♭) which then makes it very obvious.
It certainly would not be B♭♭, as the accidental before any note makes it clear what that note should be. If the composer or printer wanted B♭♭ it would have been written exactly as that.