If $A=PDP^T$, does $P$ have to be orthogonal. A matrix A is called orthogonally diagonalizable if $A=PDP^{-1}$ and $A=PDP^{T}$, where $D$ is diagonal. Therefore, $P^{-1}=P^T$ and thus $P$ is an orthogonal matrix. If you are only given the fact that $A=PDP^T$, and $D$ is diagonal, is it guaranteed that $P$ is orthogonal and $A=PDP^{-1}$ also?

No, your assertion is not true. Choose $$
 P = \begin{pmatrix}
1 & 1 \\ 0 & 1
\end{pmatrix},
$$ and let $$D = I_2 = \begin{pmatrix}
1 & 0 \\ 0 & 1 
\end{pmatrix}$$ be the identity matrix (which is obviously diagonal) and $A$ defined by $$A = PDP^T = \begin{pmatrix}
1 & 1 \\ 0 & 1
\end{pmatrix} \begin{pmatrix}
1 & 1 \\ 0 & 1
\end{pmatrix}^T = \begin{pmatrix}
1 & 1 \\ 0 & 1
\end{pmatrix} \begin{pmatrix}
1 & 0 \\ 1 & 1
\end{pmatrix} = \begin{pmatrix}
2 & 1 \\ 1 & 1
\end{pmatrix}.
$$
But $$P^{-1} = \begin{pmatrix}
1 & -1 \\ 0 & 1 
\end{pmatrix} \neq P^T,$$
so $P$ is not orthogonal, and $$
PDP^{-1} = PP^{-1} = I_2 \neq A.
$$
