1 Answer
1

I learned the same way you did, and have not seen anything recently to the contrary, in any reputable source. The second way you showed looks wrong. I would ask the person who advised you for a reference ("citation needed").

A direct quotation is set off from the
rest of the sentence by commas. Do not
use a period to end a sentence quoted
within another sentence.

This page does not address the question directly, but does show by example that it endorses the style you learned in school, not the one you heard about recently.

Update in response to edited question:

Yes, it's correct that it depends on what follows: the period at the end of the quoted sentence is changed to a comma only if the containing sentence continues after the end of the quote (e.g. with a dialogue tag like "said Tom"). If the containing sentence ends with the quote, both are terminated by the same period, which is inside the quotation marks.

Btw, your example

"The car is on the road," said Tom

is missing a final period (after Tom). I think this was just a typo, but I thought it worth mentioning in case that was actually part of your "Is this correct?" question.