this sounds right to me, but I think it's also important to be sensitive to the local norms of the group you are in ... I wouldn't assume there are global rules, and what is comfortable or expected will vary.
That's not necessarily helpful, but it might be good to know that it's better to be relaxed and receptive than rigid and anxiously following a rulebook.
I wouldn't generally ask if anyone wants to join me going to the restroom, but I might in some contexts announce I need to and will be going, allowing others to join if they want. In some contexts announcing also allows coordinating in case someone needs to stay to keep a table or spot reserved, and it can then sometimes be more like a question of consent that it's ok if I go (because my going might restrict their going in that situation).