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.
No; or rather, only in exactly the same way as it’s ‘necessary’ to put a comma before an ‘as clause’ like the one in your example.
Formal writing or not, in modern English, at least, most commas are optional.
My limited experience of it is that Cambridge is one of the worst English dictionaries available, which is why almost no-one living in England has heard of it.
Prove this for yourself by comparing anything of which you are not certain to Oxford or Webster, for instance. Not in my but in your view, which is better?
With or without any comma, ‘I hope they’ve decided to come as I wanted to hear about their India trip’ throws up at least three questions which might not be truly important in or of themselves, but as evidence for the reliability of a dictionary, cut about as much mustard as a dead, red herring. At best, that sentence is unnatural; it’s rather clearly not a quoted but an artificially constructed example, and not a good one.
In the same way ‘Sean had no reason to take a taxi since his flat was near enough to walk to’ is wholly comprehensible, but was it supposed to be merely comprehensible, or intended to give a clear and helpful illustration of a specific point, while at the same raising no irrelevant questions?
Best Answer
No: you should not place a comma before as well at the end of a sentence.
You would normally put a comma before as if it introduces a further explanation of the function of something, and only then if it is an afterthought: he liked her, as a friend. And of course you would use a comma if as introduces a full clause that is not closely connected to the main clause: English is not difficult, as it is a Germanic language. But, in other situations, you normally wouldn't put a comma before as.