You can book the train from Oban to Edinburgh but it doesn't pay you to do so.
Personally I would book it as Oban to Glasgow, and Glasgow to Edinburgh to save myself around £5. But if you book it on Scotrail as a through fare there is something called split ticketing which they themselves suggest. That saves a further £3 by booking as Oban to Croy, and Croy to Edinburgh. Croy is a suburban station on the Edinburgh line in Glasgow. Just for clarity Croy is just a ticketing point, you don't change trains there. (But, as an aside, Croy is a very good access point for the Antonine Wall, the Scottish equivalent of Hadrian's Wall).
The CalMac schedule is now out, and bookeable from 18 February. As a foot pax there is no race to book.- https://assets.calmac.co.uk/media/codpwm0v/wtt-11-oba-cra.pdf
There will be a bus connecting out of the early request only sailing from Iona and another one connecting out of a ferry around 9am. That will then connect into the lunchtime train from Oban.
Ten minutes for that ferry to train interchange (if the ferry is on time) is very adequate.
Iona Summer Timetable- https://assets.calmac.co.uk/media/xckjshu5/stt-table-13-fio-ion.pdf
The connection at Fionnphort is meant to be tight but the bus waits for the ferry. Likewise at Craignure where ferry connects with bus.
Until the WCM bus timetable comes out in early to mid March we can't be precise but that's the theme.
If you miss a rail connection at Oban due to a late ferry, then your rail ticket allows you to catch the next one.
So for exact timings revisit this in late March.
But it works at least three times a day as there is an afternoon connection as well.
On a Sunday there should be a through Oban to Edinburgh afternoon train (hopefully), and there is also a summer afternoon Oban to Edinburgh bus changing at Tyndrum- as opposed to Glasgow.