If the glass lids are flat, it may not be a good idea. For one, the fish would need air, and two, the cat might try to sit on it. My cat used to climb onto the dresser I had a fish tank on, and he would sit on TOP of the tank hood, even though it wasn't flat. Then he'd stare at me until I noticed and made him get down. But, I think he thought he was monkey or something, because he climbed on everything to get attention.
All cats are different though, and I've known cats that don't even notice the fish, or do notice the fish and leave them alone. My brother has a tank on a not so sturdy stand, and he has three cats and a big dog, and none of them bother the fish.