I think I read this book in the mid-00s. It was a young adult novel with a protagonist who was, I think, learning how to travel between dimensions. They got separated from their tutor in a world with narrow alleys and a many-storied multipurpose building with unfriendly residents, and had to get scrip for food--I don't recall how. My impression of the world was industrial dystopia, but I don't remember any details that would indicate as much.
I also distinctly remember a scene of a young elephant--who may also have been learning to travel between universes--getting stuck in one of the world's narrow alleys (maybe this is how the protagonist got separated from their tutor?). I'm pretty sure the elephant was of human-level intelligence and able to communicate with the protagonist.
Has anyone else read this book to know what I'm talking about? I'm pretty sure the scene I described above is only a small part of the book, not the main plot. I think it was part of a series but I'm not sure which one.