We do the same in Spanish upon leaving a room, walking away from a conversation, getting up from the table, walking through a group of people who are chatting, etc. We say "con permiso" (with permission) or "con su permiso" (with your permission). The proper term in English is "excuse me". My boys, and children generally, will say "may I be excused" when leaving the table, which is indeed asking for permission?
BTW, in Spanish it is polite for the listener to respond "concedido" (granted). Is there a similar rule in Portuguese?