In my answer below, I use the Nagai Park swimming pool as a reference, but I think it is almost identical to other swimming pools in Japan.
It is totally not allowed to swim in any direction parallel to the width of the pool.
Almost the same as what was already mentioned by @jpatokal in his answer, each lane has its own purpose (probably scheduled differently everyday and posted at the lane). For example,
the first lane is only for ones who want to walk in the water (physical therapy).
the second lane is for ones who want to either walk or swim (beginner swimmers).
the third lane is for one who want to swim slowly (beginner).
the forth lane is for one who want to swim fast (professional).
the other lanes are for school students.
Each lane is marked with a colored rope. Unfortunately, each lane is also divided into 2 sub-lanes but without any colored rope. We swim on the right part and return on the left part. This division makes me sometimes accidentally kick other people coming from the opposite direction. So keep your eyes open.
On the same part, it is not allowed to chase and overtake the person swimming in front of you because you will occupy the left part and hit the oncoming swimmer.
Watches and necklaces (among others) are not allowed to be worn in the water.
I have purchased one month unlimited ticket for 4900 yen. I can make use of the pool everyday (except for some national holidays) at any time during the work day.
The water is disinfected by using chlorine rather than ultra violet.