say we have a coordinate frame defined by T_po, w.r.t. the world frame.
How can I rotate this coordinate frame using a rotation matrix such both position and orientation rotate together. So far I tried multiplying a rotation matrix, but this rotation matrix only rotates the frame locally with respect to it's own frame.

If I understand your statements correctly, you have the homogeneous transformation $T^O_A$ relating coordinate frame $A$ to the global reference frame, and you wish to compute $T^O_B$, generated by rotating the frame $A$ by an angle $\theta$ about the origin.
Let us represent $T^O_A$ as: $$ T^{O}_{A} = \begin{bmatrix}R^{O}_{A}& \begin{bmatrix}x_A\\y_A\end{bmatrix} \\\mathbf{0}&1\end{bmatrix} $$ Realize that $R^{O}_{B} = R^{O}_{A}Rot(z,\theta)$, where $Rot(z,\theta) = \begin{bmatrix}cos(\theta)&-sin(\theta)\\sin(\theta)&cos(\theta)\end{bmatrix}$ is the rotation matrix about the z axis. To describe the origin of the frame $B$, we need to rotate the vector $\mathbf{r} = \begin{bmatrix}x_A\\y_A\end{bmatrix}$ by $Rot(z,\theta)$: $$ \begin{bmatrix}x_B\\y_B\end{bmatrix} = Rot(z,\theta)\begin{bmatrix}x_A\\y_A\end{bmatrix} $$ Now, you can formulate $T^O_B$ as: $$ T^{O}_{B} = \begin{bmatrix}R^{O}_{B}& \begin{bmatrix}x_B\\y_B\end{bmatrix} \\\mathbf{0}&1 \end{bmatrix} = \begin{bmatrix}R^{O}_{A}Rot(z,\theta)& Rot(z,\theta)\begin{bmatrix}x_A\\y_A\end{bmatrix} \\\mathbf{0}&1 \end{bmatrix} $$