I did a cruise around the UK and Norway a couple of years ago. There were stops in Cork and Glasgow (actually the ships stop at Cobh and Greenock). If it's a major cruise line they probably run golf tours as shore excursions. Your friend might want to check what they're offering. It's usually expensive but it makes the logistics easier. On my cruise the pro broke his leg and missed the ship, so we were on our own to make arrangements with the help of the concierge.
In Cobh we went to Cork GC which Patrick and Pete are referring to as Little Island. Interesting course and the taxi ride wasn't too expensive. Cost around $100 for the round.
From Greenock we went to Gourock. Not too far from Greenock, so again the taxi ride wasn't too expensive. The course was a bargain at arounf $45. It has quite an uphill first hole to the upper part of the course which was heathlands in nature. Some interesting elevation changes going up and coming down. Your friend had better be in good shape to try this one. It's a real hike up and down.
From Greenock to Troon or Prestwick is probably doable if he's in port long enough. They're not too far but the drive takes more time that it looks like and would be pretty expensive I'd think.
You might refer him to
http://www.uk-golfguide.com/ to check out courses in the neighbourhoods.