I've been looking for that story for several years now, but I cannot find it anywhere and no search on Google turned up anything helpful.
What I remember:
The story involved some sort of attempt to conquer or infiltrate Earth,
The main protagonists were two children or teenager, I think they were siblings (brother and sister) but I'm not quite sure,
They were taken by an alien to some sort of intergalactic UN or council,
This UN spanned three galaxies: Andromeda, the Great Magellanic Cloud, and had begun to expand into the Milky Way.
Its motto was 'three galaxies, one law',
The race that tried to invade Earth did so in violation of the law, and was condemned to death by having it's home planet sent to another dimension were it would freeze.
The main protagonists were brought back to Earth mere minutes after leaving it, despite having spent hours or days away.
I've read that story maybe twenty to twenty-five years ago, at a public library. It was a French translation (I'm French) and I'm pretty sure that the original story was quite older, though I couldn't say if it was from the 80's, 70's or even earlier.
This would be Robert A. Heinlein's Have Spacesuit, Will Travel. It's a perfect match on every point save one (you have a good memory!). (Quibble: I believe that the Three Galaxies were the Milky Way and the two Megallanic clouds.) See Wikipedia for some details. (As far as I know there isn't an online version.)
It was first published as a serial in The Magazine of Fantasy & Science Fiction (August -- October 1958) and published by Scribner's in hardcover in 1958. (Opinion: It's the best of the Heinlein Juveniles which were formative reading for so many of us.)