A solution with zref (although not particularly needed, but it is a very convenient and powerful package), using one label per entity, i.e. section etc.
The \RegisterPostLabelHook macro from xassoccnt package adds 'another' labeling command that is executed after \label, here it is zlabel. A disadvantage of this approach is that any \label call generates two label entries in the .aux file instead of only one. If this is not wanted, rename all \label occurences into \zlabel and comment out \RegisterPostLabelHook.
The label information is evaluated in \refsectionpageref and displayed accordingly.
The macro checks also whether both labels appear on the same page, but it does not eject any warning whether the label is defined or the label pointing to the later entity is used as first argument, nor does it check whether the labels used are tied to section counters here, so mixing of labels belonging to different counters is possible, unfortunately.
The starred version of \refsectionpageref suppresses hyperlinks if this feature is preferred.
\documentclass{article}
\usepackage{blindtext}
\usepackage[user,hyperref,counter]{zref}
\usepackage{xassoccnt}
\usepackage{hyperref}
\makeatletter
\providecommand{\hyperlink}[2]{}
\NewDocumentCommand{\extractsectionlabel}{sm}{%
\zref@ifrefundefined{#2}{}{%
\IfBooleanTF{#1}{%
\zref@extract{#2}{page}%
}{%
\hyperlink{\zref@extract{#2}{anchor}}{\zref@extract{#2}{page}}%
}%
}%
}
\NewDocumentCommand{\refsectionpagerange}{smm}{%
\IfBooleanTF{#1}{%
\ifnum0=\pdfstrcmp{\zref@extract{#2}{page}}{\zref@extract{#3}{page}}%
\extractsectionlabel*{#2}%
\else
\extractsectionlabel*{#2} -- \extractsectionlabel*{#3}%
\fi
}{%
\ifnum0=\pdfstrcmp{\zref@extract{#2}{page}}{\zref@extract{#3}{page}}%
\extractsectionlabel{#2}%
\else
\extractsectionlabel{#2} -- \extractsectionlabel{#3}%
\fi
}%
}
\makeatother
\RegisterPostLabelHook{\zlabel}
\begin{document}
See \refsectionpagerange{foo}{fooend}
\section{Foo} \label{foo}
\section{Foobar} \label{foobar}
\blindtext[10]
\clearpage
\section{Fooend} \label{fooend}
\clearpage
\end{document}

\labelling your sections, then it would be possible to automate the end-of-section\label. Do you have a consistent way of writing such a\label? In your code snippet, you usesec:X-startandsec:X-endfor some section you want to internally callX. Would you always use this style? Are you open to alternatives? – Werner Nov 24 '16 at 07:27\chapter,\section,\subsection, etc -- insert elaborate markers on the pages they occur. However, LaTeX doesn't collect information about the range of pages that "belong" to the respective sectioning command. The sectioning commands aren't defined as LaTeX environments, i.e., there is no "section" environment and no associated\begin{section}and\end{section}instructions. Thus, short of some major hacking of all sectioning-related commands I can't picture how your stated objective could be achieved using LaTeX. (ConTeXt may be a different matter.) – Mico Nov 24 '16 at 08:25