As in the other answer, I'll write $U$ for $\widetilde{M_1}$ and $V$ for $\widetilde{M_2}$ just to save on typing.
The $p=1$ case is doesn't depend on orientability or having closed manifolds.
The Mayer-Vietoris sequence starts with $$0\rightarrow H_{dR}^0(M)\rightarrow H_{dR}^0(U)\oplus H_{dR}^0(V)\rightarrow H_{dR}^0(U\cap V)\rightarrow H^1_{dR}(M)\rightarrow H^1_{dR}(U)\oplus H^1_{dR}(V)\rightarrow H^1_{dR}(U\cap V).$$
But $H^0_{dR}$ measures the number of components. Indeed, there are no $(-1)$-forms, so $H^0_{dR}$ is simply the kernel of the differential $d$, when restricted to functions. But a function with trivial derivative is constant on connected sets. Because $n\geq 2$, both $U$ and $V$ are connected. In addition, as you noted, $U\cap V$ is homotopy equivalent to $S^{n-1}$ and $n\geq 3$, so $H^1_{dR}(U\cap V) = 0$.
Thus, the MV sequence looks like $$0\rightarrow \mathbb{R}\rightarrow \mathbb{R}^2 \rightarrow \mathbb{R}\rightarrow H^1_{dR}(M)\rightarrow H^1_{dR}(U)\oplus H^1_{dR}(V)\rightarrow 0.$$
The first map $\mathbb{R}\rightarrow \mathbb{R}^2$ is injective, so the image is a one-dimensional subspace of $\mathbb{R}^2$. This must be the kernel of the map $\mathbb{R}^2\rightarrow \mathbb{R}$. Now the rank-nullity theorem implies that this map has rank $1$, so it must actually be surjective. That is, the map $\mathbb{R}^2\rightarrow \mathbb{R}$ has image all of $\mathbb{R}$. This is the kernel of the map $\mathbb{R}\rightarrow H^1_{dR}(M)$. In other words, the map $\mathbb{R}\rightarrow H^1_{dR}(M)$ is the $0$ map. Exactness now implies that the map $H^1_{dR}(M)\rightarrow H^1_{dR}(U)\oplus H^1_{dR}(V)$ is injective. Since it is also surjective, it must be an isomorphism. This concludes the $p=1$ case.
For the $p=n-1$ case, we'll have to work a bit harder. As you noted, using the fact that $H_{dR}^\ast(S^{n-1})$ is known, the Mayer-Vietoris sequence looks like
$$0\rightarrow H^{n-1}_{dR}(M)\rightarrow H^{n-1}_{dR}(U)\oplus H^{n-1}_{dR}(V)\rightarrow \mathbb{R}\rightarrow H^n_{dR}(M)\rightarrow H^n_{dR}(U)\oplus H^n_{dR}(V)\rightarrow 0$$
Claim: The map $H^{n-1}_{dR}(U)\rightarrow H^{n-1}_{dR}(U\cap V)$ is the $0$-map. So is the map $H^{n-1}_{dR}(V)\rightarrow H^{n-1}_{dR}(U\cap V)$.
Let's believe the Claim for now. Believing it, the map $H^{n-1}_{dR}(U)\oplus H^{n-1}_{dR}(V)\rightarrow \mathbb{R}$ must be the zero map. Thus, its kernel is everything. Exactness now implies the map $H^{n-1}_{dR}(M)\rightarrow H^{n-1}_{dR}(U)\oplus H^{n-1}_{dR}(V)$ is surjective. Since this map is also injective, it is an isomorphism when $p=n-1$ as well.
Thus, we need only prove the Claim:
Proof: I'll just prove this for $U$, the proof for $V$ being analogous.
As you noted, $U\cap V$ is diffeomorphic to $S^{n-1}\times (-1,1)$, and I'm thinking of $S^{n-1}\times \{1-\epsilon\}$ as being a very tiny ball around the deleted point in $M_1$. Consider the homotopy where we retract the interval $(-1,1)$ to $(-1,0]$. Performing this homotopy on $U$ (keeping points of $U\setminus (S^{n-1}\times (0,1)$) fixed, we see that the pair $(U,U\cap V)$ is homotopy equivalent to $(M'_1, \partial M_1')$ where $M_1'$ denotes $M_1$ with a small ball removed and $\partial M_1'\cong S^{n-1}$.
So, instead of studying the map $H^{n-1}_{dR}(U)\rightarrow H^{n-1}_{dR}(U\cap V)$, we may instead study the map $H^{n-1}_{dR}(M_1')\rightarrow H^{n-1}_{dR}(\partial M_1')$. Because $M_1$ is closed and orientable, $M_1'$, is a compact orientable manifold with boundary, so is amenable to Stokes's theorem.
Now, let $[\eta]\in H^{n-1}_{dR}(M_1')$. Since $\eta$ has a cohomology class, $d\eta = 0$. Stokes's theorem now yields
$$0 = \int_{M_1'} d\eta = \int_{S^{n-1}}\eta.$$
This means that $\eta$ restricts to a $0$-volume form on $S^{n-1}$ which, as you know, implies that it restricts to an exact form. Thus, $i^\ast(\eta) = 0$ where $i:S^{n-1}\cong \partial M_1'\rightarrow M_1'$ denotes the inclusion and $i^\ast:H^{n-1}_{dR}(M_1')\rightarrow H^{n-1}_{dR}(\partial M_1')$ is the induced map.$\square$
Best Answer
Set up notation:
Let $B_i\subseteq M_i$ be open discs and $N_i$ normal neighbourhoods of the boundaries. Let $\varphi:N_1\to N_2$ a diffeomorphism that induces the gluing map (ie $\varphi$ maps the inward collar of $N_1$ to the outward collar of $N_2$ and vice versa). Let $V_i$ be the points of the open discs not in the normal neighbourhoods, note $V_i$ is a closed disk.
Then $M_1\#M_2$ is equal to $M_1 - V_1$ and $M_2-V_2$ glued along the normal collars, ie $M_1\#M_2$ is defined as the quotient space $$(M_1- V_1) \cup_\varphi (M_2- V_2):= [(M_1-V_1)\cup (M_2-V_2)]/\{x\sim \varphi(x)\}$$
Let $U_i$ then be the image of $M_i- V_i$ in the quotient space. This is open since the quotient map necessarily is an open map. Further it is diffeomorphic to $M_i-V_i$ since this quotient map is a local diffeomorphism and it is injective on this set. The intersection $U_1\cap U_2$ is then the image of both normal neighbourhoods $N_1, N_2$ under the quotient mapping - infact these two neighbourhoods have the same image so it suffice to just take the image of $N_1$. But the quotient map is a local diffeomorphism and injective on $N_1$, hence $U_1\cap U_2\cong N_1$.
Now prove: