Using a comma before "rather than"
English Teachers are like MS Word's grammar checker. They should be used but not trusted.
You are correct that the first statement needs no comma before rather. Here, the expression rather than [to] a restaurant is essential information for understanding the statement. It also describes or explains grocery store, again indicating it's importance.
Commas separate parts of sentences. Because you don't want to separate the final phrase in the first example, you don't use a comma.
In the second example, rather than going out to a restaurant, you still don't need a comma before rather. Here, the expression also provides necessary information, as in the first case. The phrase is not parenthetical, and it certainly isn't an appositive.
However, you will need to follow the expression with a comma because it is serving as an introductory dependent phrase, as in "Rather than going to the store, we went to the restaurant."
But why no comma before rather in the second example? The word that turns the following expression into a noun phrase, here to be used as the direct object of decided. If we place a comma after that, we separate the expression from the noun phrase, which is not correct because it needs to be part of the noun phrase.
Bottom Line:
First example: We decided to go to the grocery store rather than to a restaurant.
Second example: We decided that rather than going out to a restaurant, we would go to the grocery store.
You might pick up a copy of Zen Comma, which has a much more thorough discussion of comma uses.
On a side note: You seem to be confused about appositive phrases. Although appositives don't provide essential information, not every non-essential phrase is an appositive. I think you mean parenthetical expressions, of which appositives are one type, or non-restrictive phrases and clauses.
Example appositive: "This toy, a 1992 Barbie doll, is a family treasure." A 1992 Barbie doll is an appositive.
Example non-restrictive clause: "Take away my life, which is as precious to me, but don't take my dignity." Which is precious to me is the non-restrictive clause.
You don't have to have that comma before "rather" in your first sentence. However, if your intent is to emphasise that the first part of the sentence could stand alone, and the "rather than" part is almost like an afterthought, you could put the comma there (it would be a little more subtle than starting a new sentence with "Rather than", which many authors these days seem to use). Neither way is incorrect, strictly speaking.