Not clear from the OP whether you mean at table service or counter service restaurants.
I have heard at some counter service they permit you to come back and get your ice cream after you have finished eating your entree - specifically so the ice cream won't melt before you're ready to eat it. As I understand it they don't let you come back hours later for the dessert. You are supposed to pick it up after you're done with the rest of your meal.
As for table service, you won't be able to go back and get the dessert later. You can eat it, take it with you (without ice cream) or not order it at all.