Do I need commas in the following sentences?
They sailed down a river, The Yangtze, to get to their destination. He built a sprawling palace, the Grand Trianon, using decorative ceramic tiles.
Yes, those commas are necessary. You have used a construction called the non-restrictive appositive.
Why is it non-restrictive even though it seems essential, somwhow? In the sentence, “They sailed down a river, the Yangtze, to get to their destination” the words a river and the Yangtze identify exactly the same real thing in the world. Note that the positions of the appositive phrases could be swapped and that arguably this would make the non-restrictiveness more clear. “They sailed down the Yangtze, a river, to get to their destination.” Written that way, it is obvious that the phrase “a river” is not essential to identifying the Yangtze as the river they sailed down because the Yangtze is, in a sense, already a river, whether or not the reader knows this. Just as, in the original formulation, the river they sailed down was already the Yangtze. Adding “the Yangtze” in commas provided the reader information she might not have otherwise known, but it was not essential to establishing the identity of the river and the Yangtze in the real world.
For the purposes of determining restrictiveness, the “essentialness” of a clause is independent of the evaluation of any ostensible pragmatic context. Take the example, “Jane Smith, noted biologist, has arrived.” It’s easy to imagine the following exchange:
P1: “Jane Smith has arrived.”
P2: “What? Who?”
P1: “Uh… sorry. Jane Smith, noted biologist, has arrived.”
P2: “Oh, right. We should probably get the projector soon.”
In this case, it looks like “noted biologist” was essential to determine the meaning of “Jane Smith” and that, therefore, “noted biologist” is restrictive, should not be in commas, and the whole sentence should be rewritten as “Noted biologist Jane Smith has arrived.” However, the reason Wikipedia identifies that sort of “false title” as controversial is because the function of the phrase “noted biologist” in this sentence syntactically is not essential to identifying the subject who arrived. The Jane Smith who arrived was always already the noted biologist. The author makes this so by use of the commas. That, upon analysis, it seems “essential” for Person 2 is only a result of the reader’s attempt to use a feature of the pragmatic context to determine the semantic meaning of the sentence.