We are called to love our neighbour which means when a friend or loved one who dies and isn’t from the Catholic tradition, it is ok to attend that person’s funeral. Funerals are a time to celebrate the life of the individual, say good bye and offer support to a people in need.
When it comes to attending a non-catholic service which is not a funeral, that too is perfectly acceptable. If it is a non Christian service meaning the service belongs to the Buddhist, Muslim, Ba’al religions just to name a few religions, it is never ok to participate. It is ok to attend and observe because I believe to love our neighbour, we also need to understand who our neighbour is, what they believe etc. Jewish services, one can participate in the prayers because Christianity is derived from Judaism and therefore it is the same God that is found in the same religions. (I suggest anyone who wishes to participate in a Jewish service to speak with the rabbi and their priest ahead of time since there might be some things that a non-jewish person may not be allowed to join in)
When it comes to attending other Christian denominations such as the baptist, Pentecostal, Lutheran, Anglicain churches etc, it is again permissible to participate 99%. Meaning as long as you don’t join them in communion, everything considering it is the same God, same Christian teachings though taught differently in some respects. I suggest one visits an established denominations such as one of these because their accountability and their religious beliefs are more established.