Note: See the comment at the bottom about Projective Hilbert Space.
If $|a\rangle$ is a ket then $e^{i\phi}|a\rangle$ is also a ket. But in general
$$
|a\rangle \neq e^{i\phi}|a\rangle
$$
Also, $\frac{1}{\sqrt{2}}|a\rangle$ is also a ket but in general
$$
|a\rangle \neq \frac{1}{\sqrt{2}} |a\rangle
$$
No one is saying in quantum mechanics that the kets $|a\rangle$, $e^{i\phi}|a\rangle$ and $\frac{1}{\sqrt{2}}|a\rangle$ are equivalent to each other as vectors or kets.
What is going on is that in quantum mechanics, the space of kets is larger (in some sense) than the space of states. In a mathematical sense we might say that a state is an equivalence class on the space of kets.
Suppose we have a Hilbert space $\mathcal{H}$. Let $|a\rangle, |b\rangle \in \mathcal{H}\setminus{0}$ (The Hilbert space excluding the zero vector). Define the equivalence relation $\sim$.
$|a\rangle \sim |b\rangle$ iff there exists a $\phi \in [0, 2\pi)$ such that
$$
\frac{|a\rangle}{\sqrt{\langle a|a\rangle}} = e^{i\phi}\frac{|b\rangle}{\sqrt{\langle b|b\rangle}}
$$
That is, the normalized version of $|a\rangle$ is related only by a phase factor to the normalized version of $|b\rangle$.
We can now define the equivalence class of $|a\rangle$:
$$
\left[|a\rangle\right] = \left\{|b\rangle \in \mathcal{H}\setminus 0: |b\rangle \sim |a\rangle \right\}
$$
That is, the set of all kets $|b\rangle$ that are equivalent to $|a\rangle$ under equivalence relation $\sim$.
We can now define the set of states as
$$
\mathcal{S} = \left\{\left[|a\rangle\right]: |a\rangle \in \mathcal{H}\setminus 0\right\}
$$
That is, the set of states, $\mathcal{S}$ is the set of all equivalence classes within $\mathcal{H}\setminus 0$ under the equivalence relation $\sim$.
Note for example, that
\begin{align}
\left[|a\rangle \right] = \left[e^{i\phi}|a\rangle \right] = \left[\frac{1}{\sqrt{2}}|a\rangle \right]
\end{align}
This is basically the rigorous statement of the physicists claims that "all states must be normalized" and "global phases have no physical meaning".
Example:
\begin{align}
|\psi_1\rangle =& \frac{1}{\sqrt{2}} \left(|a\rangle + |b\rangle \right)\\
|\psi_2\rangle =& e^{i\phi}\frac{1}{\sqrt{2}} \left(|a\rangle + |b\rangle \right)\\
|\psi_3\rangle =& \frac{1}{\sqrt{2}} \left(|a\rangle + e^{i\phi}|b\rangle \right)\\
\end{align}
We can see directly from the definition of $\sim$ above that
\begin{align}
|\psi_1\rangle \sim |\psi_2 \rangle
\end{align}
So this means that
\begin{align}
\left[|\psi_1\rangle\right] = \left[|\psi_2\rangle\right]
\end{align}
That is, even though the kets $|\psi_1\rangle$ and $|\psi_2\rangle$ are not equal, the states that they represent, $\left[|\psi_1\rangle\right]$ and $\left[|\psi_2\rangle\right]$, are equal.
But, because $|\psi_3\rangle$ involves a relative phase we have that in general
\begin{align}
|\psi_3\rangle \nsim |\psi_1\rangle
\end{align}
So in general
\begin{align}
\left[|\psi_3\rangle\right] \neq \left[|\psi_1\rangle\right]
\end{align}
In this case the kets $|\psi_1\rangle$ and $|\psi_3\rangle$ are not equal and the corresponding states $\left[|\psi_1\rangle\right]$ and $\left[|\psi_3\rangle\right]$ are also not equal.
However, all of this is much too verbose for physicists. Physicists commit the usual abuse of notation and simply identify the states $\left[|a\rangle\right] \in \mathcal{S}$ with their representative kets $|a\rangle$ and simply keep in mind the two rules mentioned just above.
So you have to keep in mind, when doing quantum mechanics, whether what you are working with at any given moment is meant to truly represent a state or if you are just manipulating a ket. This might be confusing because the states in quantum mechanics are written in terms of kets.
In reference to the examples above, physicists would simply say that $|\psi_1\rangle$ and $|\psi_2\rangle$ represent the same state (justified by the facts that 1] both kets are normalized and 2] they only differ by a global phase) while $|\psi_3\rangle$ represents a different state even though $|\psi_{1,2,3}\rangle$ are technically kets and not states which are distinguished from eachother in my treatment here.
Furthermore, I'll note that it would be perfectly valid to formulate quantum mechanics wholly in terms of kets (excluding the zero ket because it is weird). In that case we would say states truly are represented by kets. We would just have to alter the Born rule to include an explicit normalization step prior to the calculation of probabilities and we would carry around states $|a\rangle$, $e^{i\phi}|a\rangle$ and $\frac{1}{\sqrt{2}}|a\rangle$ as independent states that just happen to give the exact same results for any physical measurement. Instead, Physicists pseudo-adopt the equivalence relation idea in an intuitive sense but without the formalism. This is because physicists work well off of intuition and are happy to just say all states need to be normalized and states that differ by a global phase are equivalent.
To connect a bit with the OP: What the OP calls physical states I call states and what the OP calls basis states I call kets. I think my language is an improvement here. Especially since the kets we use to describe states do not necessary need to be collected together from any particular basis. I could define a state $|\psi\rangle = |\uparrow\rangle + |+\rangle$ where $|\uparrow$ is a spin up state chosen from the $z$-basis for a spin and $|+\rangle$ is the spin up state in the $x$-basis. The point is that when we write down states we do it using kets.
To answer the question: "My question is: what is the proper and rigorous way to define things?" I think I've given a sufficient answer above in terms of states being represented as equivalence classes on kets.
To answer the question that is the title of this thread: "Very precisely explaining when phase plays a role or doesn't play a role in QM". Kets that differ by a phase factor are indeed different kets. States represented by kets that differ only by a phase factor are NOT different states.
edit: I just looked up the definition of projective Hilbert space which I have redefined here. It looks like we can define it more slickly by defining the equivalence relation as $|a\rangle \sim |b\rangle$ iff there exists any $z \in \mathbb{C}$ with $|a\rangle = z|b\rangle$. This covers the normalization and global phase in one swoop. I'll leave my definition and text above because I think it highlights the point that if we are concerned about putting together kets with different phases to form a state we should also be concerned about putting together kets of different norms to form a state. Of course my answer shows that we do not, in fact, need to be concerned about any of this.