This is purely speculation, but from what it looks like to me, that Sun Breathing user saved Tanjiro's family and Tanjiro's dad tried to learn the "Hinokami Kagura" from that Demon Slayer but wasn't able to actually fight with it since he didn't have real training? Idk tbh, but basically I think Tanjiro basically learned the Sun Breathing technique from that guy indirectly through his dad. I think the guy in the flashback that looked like Tanjiro was just his dad when he was younger, and those glimpses we've seen on the Sun Breathing guy were supposed to mislead us into thinking he's Tanjiro's dad. I haven't read ahead or anything tho, that's just my understanding of those flashbacks. I have zero clue about the whole Upper One situation tho.