The Scottish rugby legend from Edinburgh had a horse named after him emotionally win a major cash prize being put to brilliant use.