Is it okay to break no contact in order to offer condolences?

I just found out that my ex's father passed away, I'm wondering whether it is a good idea to reach out to offer my condolences.
Is it okay to break no contact in order to offer condolences?
Post Opinion