My guess is that, if you wanted to say "I'm sorry," and since you drop "là" for adjectives, you'd say ""Tôi xin lỗi."
If "Xin chao" means "hello" in a formal way, than would "Xin loi" be formal too, so if you wanted to say sorry to a friend, could you just say "loi?" Or is that not the case?
No sorry, that's not the case. "Lỗi" means "fault" or "mistake". I get this all the time when I was a kid.
My parents would ask me "con (parent referring to child) biết lỗi không?" which basically means "do you know what you did wrong?". To which, I say yes ("dạ Ba Mẹ"), and ask for their forgiveness:
"Con xin lỗi. Ba Mẹ tha lỗi cho con không?" = "I'm sorry. Do you (my parents) forgive me?"
By saying "xin lỗi", you're practically asking someone to excuse your faults. That's also why "excuse me" is a good translation too, depending on the context.
Please keep in mind that I speak with a southern dialect. I can't confirm what a northerner would say. I hope that helps!
Despite the conversation above, "xin lỗi" is in no way an adjective. "Sorry" is an adjective but it is English and is not a literal translation. "Pardon me" or "excuse me" are as valid as "sorry" as translation for "xin lỗi."