I have a vague memory that Ferrari offered Ric a drive a few years ago but he turned it down as he didn’t want to play second fiddle, however he might feel differently about that now. Ferrari obviously have Lec who is their star driver so they are looking for someone to partner him. Ricciardo’s father is Italian and he’s probably the most popular driver on the grid, so Ferrari could gain a lot of positive press by hiring him. Also Sainz has crashed that Ferrari a lot, he did a huge amount of damage to it last year, so he might not be the favourite son in Maranello.
Anyway, it is just speculation.