I'm a PO in a small company, we have 2 scrum teams. I have been attending the Retros as a viewer at times, other times, as a facilitator. The scrum team knows me well.
Is it okay to attend retros for other teams if the company is small and there is a lot of work overlap?
sorry, meant to add - I have been attending the other team's Retros as a viewer when I am not facilitating them.
Have they asked for you to be there?
It it is work overlap, then the Sprint Review would be better for you to attend because that is where the work is discussed. The Retrospective is for the team to focus on themselves and improve their ability to function as a team. Outsiders may inhibit the discussions. Also, the team having the Retrospective are the ones that can answer your question. It is their event and only they can decide if you are welcome.
It seems you are the Product Owner for both the teams. Sprint Retrospective is a Scrum event. The Product Owner is a part of the Scrum team and should attend Sprint Retrospective for both the teams.
If you are NOT the product owner of the Scrum team(even within same company) you can only attend when you are invited.
If you are product owner for many teams, you might have to consider if you have enough recourses to serve all of them