Before attempting to give an answer to the OP, I briefly discuss the definition of a quantile (percentile is also used)
Definition:
- Given a (cumulative) distribution $F$ on $\mathbb{R}$, for $0<q<1$
a $q$-quantile (or percentile) is a number $z_q$ such that
$$
\begin{align}
F(z_q-)\leq q\leq F(z_q)\tag{0}\label{quantile}
\end{align}
$$
- Similarly, if $X$ is a real valued random variable with distribution $F_X$, for $0<q<1$ a $q$-quantile is a number $z_q$ such that
$$
\begin{align}\mathbb{P}[X<z_q]=F_X(z_q-)\leq q\leq F(z_q)=\mathbb{P}[X\leq q]\tag{1}\label{quantileX}
\end{align}
$$
Some special quantile functions are
- Consider the functions $Q$, $Q^+$ defined on $(0,1)$ by
$$ \begin{align}
Q(q)&=\inf\{x\in\mathbb{R}: F(x)\geq q\}\\
Q^+(q)&=\sup\{x\in\mathbb{R}:F(x-)\leq q\}
\end{align}
$$
It is not difficult to check that $Q(q)$ and $Q^+(q)$ satisfy \eqref{quantile} for each $0<q<1$. $Q$ and $Q_+$ have the additional property that for any other $q$-quantile $z_q$ of $F$ satisfies
$$Q(q)\leq z_q\leq Q^+(q)$$
Back to the OP:
From the definition of a quantile, it is easy to see that
- Unless $F$ (or rather the Probability measure induced by $F$) is supported an a interval bounded from below, the definition of $q$-quantile cannot be expended to $q=0$.
- Unless $F$ is supported on an interval bounded from above, the definition of $q$-quantile cannot be extended to $q=1$.
However
If $F$ is supported in an interval bounded from below, one can extend the notion of $q$-quatile with $q=0$ can be done, and the functions $Q$ and $Q^+$ can de defined at $q=0$ as extended real numbers $Q(0)=-\infty<Q^+(0)=\sup\{x:F(x-)=0\}$
If $F$ is supported in an interval bounded from above, one can extend the notion of $q$-quatile with $q=1$, and the functions $Q$ and $Q^+$ can de defined at $q=1$ as extended real numbers $Q(1)=\in\{x:F(x-)=1\}<\infty=Q^+(1)$
For sample of size $n$ of some distribution $F$ on the real line, say $x_1,\ldots, x_n$ one typically considers the empirical distribution $$F_n(x)=\frac{1}{n}\sum^n_{k=1}\mathbb{1}_{(-\infty,x]}(x_k)$$
Of course $F_n$ is supported in the compact interval interval $[\min_kx_k,\max_kx_k]$, so there $0$ and $1$ quantiles are mathematically well deinided in this situation. There is no harm to define the $0$-quantile and the $1$-quantile of $F_n$ (or the sample X) as $\min_kx_k$ and $\max_kx_m$ respectively. In fact, many statistical packages display the $0$ and $1$ quantiles as the min and the max of the sample.