This answer may not be suitable because, in addition to the x-position of the upper left and lower right, it only gives the dz of the text, that is, the relative change in z from the start of the phrase, rather than the absolute coordinates on the page. It uses tabto, rather than zref.
I base this code on my answer at Draw Tikz highlighting on the background of text, and while the result here may seem a bit cluttered, it is to show you in gory detail what is being done.
Here, the command \Ohighlight{} delimits the inline text that we wish to "measure". The red text is it being set relative to the preexisting text (i.e., starting mid-line, with line-wraps, paragraphs, etc.)
At any point before \Ohighlight is called a second time, I can recall the x-coordinate of the beginning and ending of the text as well as the dz used by the text. I create the macro \demo to show this. It laps a rule of the height dz to the left; it then sets the box (in cyan color) that was measured, properly employing its mid-line starting point. Underneath the set box, it indents to the beginning of the start of the text (\tmpx} and creates a rule over to the end of the text (\tmpy), showing that it remembers where the text began and ended.
Below this graphical demonstration, it prints the value of dz, x1, and x2.
\documentclass{minimal}
\usepackage{xcolor}
\newlength\svpi
\newsavebox\tmpbox
\usepackage{tabto}
\newcommand\Ohighlight[2][]{\color{cyan}%
\tabto*{0in}\edef\tmpx{\TabPrevPos}\tabto*{\tmpx}%
\setlength\svpi{\the\parindent}%
\savebox\tmpbox{%
\begin{minipage}[b]{\textwidth}\parindent\svpi%
\tabto*{\tmpx}#2\strut%
\end{minipage}}%
{#2}%
\vspace*{\dimexpr-\dp\tmpbox-\ht\tmpbox+\dp\strutbox}%
\tabto*{\tmpx}\color{red}#2\unskip\color{black}\ %
\edef\tmpy{\TabPrevPos}%
}
\textwidth=5in
\def\demo{\noindent\llap{%
\rule[-\dp\strutbox]{3pt}{\dimexpr+\dp\tmpbox+\ht\tmpbox+\ht\strutbox}}%
\makebox[0pt][l]{\usebox{\tmpbox}}\\
\tabto{\tmpx}\rule{\dimexpr\tmpy-\tmpx\relax}{3pt}%
\par dz=\the\dimexpr+\dp\tmpbox+\ht\tmpbox+\ht\strutbox; x1,x2: \tmpx, \tmpy}
\begin{document}
The original highlight is drawn over the text.
The original definition works over...
Multi paragraphs, so my fix should try to as well.
\bigskip
Now here is my fix. \Ohighlight{The highlight is drawn under the text}
Does it work multiline?
\demo
multiline?
\Ohighlight{The highlight is drawn under the text The highlight is drawn under the text The highlight is drawn under the text The highlight is drawn under the text
A new paragraph}
And more...
\demo
\Ohighlight{short}
\demo
\end{document}

\zsaveposuses\pdfsaveposto save the location on the baseline of where it's placed. You're creating a tabular that has 3 rows - you should only use one and adjust vertically the y-coordinate from the baseline. Can you show how you are creating the rectangle? – Werner Feb 24 '15 at 02:00