Using B trees to search inside dynamically changing array segments
I assume the "B-tree" in your post is in fact a "B+-tree" and array $\small A$ is stored in an increasing manner. Your idea is almost good and needs some small revision.


You need to test whether $\small A[l] \leq key$ and $\small A[r] \geq key$. If $\small A[l] = key$ or $\small A[r] = key$, it is done.
If it is found that $\small A[l] &lt; key$ and $\small A[r] &gt; key$, find the LCA of the blocks containing $\small A[l]$ and $\small A[r]$, as you have done. The height of the LCA is of $\small \mathcal{O}(\log_B(n))$.
If $\small A[l] &gt; key$ or $\small A[r] &lt; key$, then obviously $\small key$ does not exist in $\small [l, r]$.


Why testing $\small A[l] \leq key$ and $\small A[r] \geq key$ is important? 

The LCA block may contain entries that direct to blocks outside $\small [l, r]$. If you start from the LCA, you may find a $\small key$ even if $\small key$ does not exist in $\small [l, r]$.