... and since the rail is legal for a ball to be on ...
It's legal if a ball goes up on the rail and then returns to the playing surface, but not if it stays up there.
"A ball that contacts the top of the rail is not considered to have been driven off the table if it returns to the playing surface or enters a pocket." (WPA rules)