Does he get his scar when Blackbeard was still part of Whitebeard's crew?
Presumably yes, as long as most of Blackbeard's activities happened as he posed as just another crew member of the Whitebeard pirates which Shanks deduced was his cover to how threatening he really is.
But to clarify more of your suspicions, this does mean that it took Shanks (at least) 10 whole years before he told Whitebeard this guy is sinister and strong.
The timeline is Shanks & crew docking at Luffy's village in Luffy's flashback from Episode of Luffy: Adventure on Hand Island. There was episode 4 of One Piece that shows Luffy's past, but this flashback includes when/how he gets his scar & follows closer to Chapter 1: Romance Dawn.
Luffy is 19 in the New World (has flashback) -> 12 years earlier caption -> Luffy is 7 & Shanks has a scar.
The meeting with Whitebeard happens while the Strawhat Crew is in Water 7 when Luffy is age 17. Shanks only met with Whitebeard once he knew Ace was hunting him down, not just to tell him about the scar which might explain his wait.