James Neal and Chris Kunitz also scored in the shootout for Pittsburgh. Loui Eriksson and Jamie Benn countered for Dallas.
The Penguins lost defenseman Kris Letang (upper body) and left winger Steve Sullivan (lower body) to injuries but rallied for a pair of third-period goals to send the game to overtime and the shootout.
"It was back and forth," Penguins center Jordan Staal said. "It felt a lot like playoff hockey - very tough, lots of hitting."
Craig Adams and Kunitz scored over a 47-second span of the third period to make it 3-2 Pittsburgh. But Ryder's 26th goal tied it at 3 at 7:23 of the third.
The Pens trailed 2-1 when Adams deflected Staal's shot by Lehtonen at 3:33 for Adams' fourth of the season.
Kunitz put the Penguins in front with his 18th goal, when he directed Paul Martin's setup past Lehtonen at 4:20 of the third.
"I liked the response from our team," Penguins coach Dan Bylsma said. "We came out hard and played well in the third period."
Sheldon Souray had given Dallas a 2-1 advantage with 12.2 seconds remaining in the second period when he beat Fleury from the high slot after a pass from Eriksson. Souray's sixth of the season was his first since Feb. 1.
Souray hit the crossbar with a shot from the point with about a minute left in overtime.
Dallas' four-game winning streak ended, but the Stars improved to 71 points to take over sole possession of eighth in the Western Conference.
Pittsburgh has 79 points, seven behind the Atlantic Division-leading New York Rangers.
Sullivan added a goal for the Penguins, who had won their previous three by a total score of 14-3. Sullivan missed all of the third period with the lower-body injury.
The teams hadn't played in Dallas since the trade on Feb. 21, 2011, that sent Neal and defenseman Matt Niskanen from the Stars to the Penguins for defenseman Alex Goligoski.
Goligoski enjoyed the physical give-and-take against his former teammates.
"It was kind of a back-and-forth game with the score and it was a fun game to be a part of . . . we'll take our point and move on," Goligoski said.
Letang left in the first period did not return. He was down for several minutes midway through the period after he was hit in the head area on a hard check along the end boards by Dallas' Eric Nystrom.
Letang, Pittsburgh's top-scoring defenseman with 31 points, skated shakily to the locker room while Nystrom went to the penalty box on a roughing minor. The Penguins announced in the second period that Letang was done for the night. "I know [Nystrom] traveled a distance to make the hit," Bylsma said.
In other games:
* At Edmonton, Andy McDonald scored two goals and Jaroslav Halak made 22 saves as the St. Louis Blues topped the Oilers, 5-2.
* At Anaheim, Derek Roy and Brad Boyes scored goals and Ryan Miller made 43 saves as the Buffalo Sabres blanked the Ducks, 2-0.
* At Chicago, Marian Hossa scored twice as the struggling Blackhawks overcame an early two-goal deficit and defeated the Toronto Maple Leafs, 5-4, to end a three-game losing streak.