Definitely yes, if at all possible. Minimally, they should be given a chance to say their goodbyes after the pet has passed away. This will bring them closure and will decrease the chances that the pet will be waiting at the door for hours for the deceased pet to come back home, or for them to look all over the house, under beds, behind couches, looking expectantly out the windows, getting depressed, going off their food, etc...
This is especially important for dogs, since they are naturally pack animals, but it is also true for a lot of cats.
The disappearance of a pack member is very difficult to cope with for a dog. And frequently also for a cat although they are not naturally pack animals. They do frequently naturally live in "families" also called "clowder" or "clutter" (a group of cats). They do experience friendship and attachment to other cats or pets.
If possible, I encourage other pets to be present throughout the procedure if possible. Rarely, some pets will be too "hyper" to be present during the procedure or sometimes too anxious around strangers and it is preferable to have them in a different room. In my experience, however, most pets, even the most "hyper" ones will settle after becoming acquainted with me and I would say that almost ALL of them sense what is happening and will calm down after the procedure has started and will curl up at a small distance or sometimes even will curl up next to their friend and accompany them right to the doorstep of their journey.
I have seen cats as well as dogs take their role very seriously in the support of their friend and stay next to the pet until the pet has passed away and then walk away as soon as they sense that the pet has moved on. It is amazing to me how "they know".
In any case, if it is impossible for the other pet(s) to be present during the procedure, we should at least let them come in and give them a chance to realize what has occurred after the pet has passed away. In most cases, if the pet is brought in after the euthanasia, I will leave the house and sit outside while the pet is allowed to say his or her goodbyes so that my presence does not interfere with the process. Usually, a pet who has not been present and who has not met me will have too much attention on me (or any stranger) and may be distracted.
Do not necessarily expect a lengthy process. In most cases, all it takes is a glance, a brief sniff and they walk away. They "know". And this is enough for them to be able to move on. It is entirely possible that the pet will continue to grieve and may still look for their deceased friend, but it will not be nearly as traumatic as if the pet was to experience a disappearance.