It depends, sometimes the networks own the cartoons, other times they lease them, one example of a network not owning a show is Doug. That was originally on Nickelodeon, they later was owned by Disney.
Speaking of rights, and the rivalory of Nickelodeon and Cartoon Network, is it true the pilot episode of Grim Adventures Of Billy And Mandy "Meet the Reaper" orginally aired as an Oh Yeah Cartoon short? Wikipedia said it did, yet I looked at the OYC episode guide, and there is no "Meet The Reaper" cartoon short listed.