Yes, and it's possible to do it again. The larger point being that they got to the edge of the galaxy unaided and had time to get back to Federation space. Not exactly slow speed there.
One of the many things in TOS that should be ignored. Later trek got a bit more serous, but TOS and the TOS movies did some really silly things with warp