I agree with wasleys that you will be need to spend a lot of time getting to Mull, then seeing Mull and Iona, and then getting back to Stirling and Edinburgh. That said, Stirling is well worth a visit and I do recommend it. I love the castle, and it's not just a museum. There is a lot of history there, and the town of Stirling itself is wonderful to visit, as they have a number of sites (Holy Rude Church, etc.) and it's a charming place.
If it were me, I might try and get there while I was in St. Andrews. If you have a car, that's a little over an hour away, or you could take the train to get there, although it's a bit longer that way. The easiest way to get there would be from Edinburgh, so you could wait until the end when you're back in Edinburgh and visit Stirling from there.
But with regards to the rest of Scotland, heading to the Highlands and the Islands is definitely going to take some time to get there. I would really suggest that you stick with the east coast. There are some beautiful places to visit there and you won't have the crowds you will find on the islands. You could head up to Dunfermline, which is a little bit north of Edinburgh and visit Dunfermline Abbey and Palace, along with Pittencrieff Park (donated by Andrew Carnegie who was born there). Make sure you stop in the church that is next to the abbey and see the tomb of Robert the Bruce.
After that continue on up the coast, driving through Aberdeen and Dundee. Along the way is Newburgh Seal Beach, where there is a beautiful sandy beach and an extensive sand dune system at the mouth of the Ythan River, which then flows into the sea. You might see seals at this place, as there is usually a large colony of them there. You will also see tiny little structures called pillboxes. These were reinforced structures that the British used as an anti-invasion defense against Hitler. Places like Newburgh were at risk because they had many beaches and water available for the Germans to land, so the pillboxes contained ammunition, and sometimes guards who watched for any potential threats.
Continue on up to Cruden Bay, and directly north of that are the ruins of Slains Castle, which is a fascinating structure with a lot of history. Supposedly, Bram Stoker got some of the inspiration for his Dracula castle from Slains, as he stayed in nearby Cruden Bay.
Head even further up north, you can stop at the Bullers of Buchan, where you will see thousands of birds, including puffins, cormorants, and all kinds of wildlife flying around and landing on the breathtaking cliffs there. It's incredibly beautiful there.
Then continue up the coast until you get to Fraserburgh and then turn west, as there are a number of fishing towns along the coastline there, or head southwest to the Cairngorms, where they have quite a few distilleries and some beautiful scenery in the national park there. After that, drive back to Edinburgh and spend your last several days enjoying the sights of the city and taking a day trip to Stirling. It is very easily done by train.
For what it's worth, the roads are decidedly better on the mainland than they are in the Highlands and the islands, so it does make the driving a bit easier.