Use a balanced binary tree, $T$, which stores the points of $S$ in its external nodes, ordered by their keys. At each internal node, $v$, store the number of external nodes in the subtree rooted at $v$. With this additional information, we can perform a binary search for any rank in the set. Thus, we can use an algorithm similar to the 1DTreeRangeSearch to find all the items with ranks in the range $[a,b]$ in $O(\log n+k)$ time, where $k$ is the number of answers.