You're probably thinking of the Dragonlance novel, Darkness & Light.
Darkness and Light begins in the town of Solace at the time the companions decide to pursue rumors of war and embark on their own personal quests for five years. Sturm Brightblade and Kitiara Uth Matar both decide to go north to Solamnia to learn more about their families.
Shortly after they leave Solace, they encounter a group of gnomes who are in the final stages of building a flying ship. The two companions decide that taking the flying ship to Solamnia would be much faster than on horseback or walking, so they assist the gnomes in finishing the ship. The flying ship is a success—but too much of a success, as mechanical problems lead the ship up and up until it eventually touches back down on the red moon Lunitari.
This message board post mentions the glass ants as well:
I love gnomes. I love airships. I love the giant glass ants, and the crusty pudding plants, and the magically inclined swashbuckling elves and the tower of dragon eggs, and the trip to sturm's home, and the meal sturm eats with the random mercenaries where he helps make stew by cutting up meat and adding flour to the pot, and they tell him that he's not baking bread here, and i love calculating the exact number of rasins in muffins, and the making of language from birdwhistles and and and.
Darkness and Light takes awesome dragonlance concepts and turns it into a fun romp of an adventure, and it makes me happy every single time i read it. My copy is so worn that the only way you can tell what it is is by the spine color. Yeah, it's noncanon or whatever, but i don't give a crap. I'll easily put D&L over any other dragonlance book any day of the week.