An ice cream sandwich was a dessert of the late 20th century on Earth, consisting of ice cream sandwiched between two cookies.
In 1986, an eatery on Columbus Avenue advertised that they were selling this product. (Star Trek IV: The Voyage Home)
In 2268, an image of what appeared to be an ice cream sandwich decorated an ice cream cart on Sigma Iotia II. (TOS: "A Piece of the Action")
The type of ice cream sandwich depicted on the cart is a Neapolitan. This sandwich is made of vanilla, strawberry, and chocolate ice cream, layered between two chocolate wafers.