He wasn't president at the time, but George Washington has paid out money to the family of a fallen soldier in the past.
Time Magazine reported on the statement made by President Trump with a historical footnote involving the first President of the United States.
Here's what happened: Elizabeth Neil (sometimes identified as Eliza Neil or Neill) was the widow of a Capt. Daniel Neil, killed early in 1777 at the Revolutionary War's Battle of Princeton; her husband's death had left her impoverished. So, noting that she had heard of Washington's benevolence, she went right to the top.
The Neil farm was "rendered useless by the Enemy" and she was "left with two small Children destitute of Support," unless the Continental Congress could provide help for the widows of fallen soldiers, she wrote to him. Washington forwarded the letter to John Hancock, noting that he wasn't sure what provision had been made for people in her situation but hoped to be able to answer her. Unfortunately for Neil and Washington, the very young nation had not yet created a system to provide pensions for the families of fallen soldiers.
Replying to Neil on April 27, 1777, the future president expressed his disappointment that he didn't have better news to report. Congress had "thought it rather too early to adopt a measure of this kind yet" and he could make no promises about their future decisions. "In the meantime, as I sincerely feel for your distress," he added, "I beg your acceptance of the Inclosd [sic] as a small testimony of my Inclination to serve you upon any future occasion."
The letter itself doesn't specify what the "inclosd" is — but Washington's papers do. What Washington enclosed in the letter was the not inconsequential sum of $50. As Phillip Thomas Tucker explains in his book George Washington's Surprise Attack, the money came out of Washington's own pocket.