If you are doing a ship's tour or a private tour with a licensed guide you do NOT need a VISA
If you want to wander off on your own then you NEED a visa
As I understand it
Your cruise line documents will be the invitation.
If you just want to go off for a few hours in the evening it may be worth it just to hire a guide for the night.
There are several companies that have evening activities Alla, Red October, SPB tours etc
We had booked 2 full day tours with SPB and the cost was about $300.pp (average for all) if we wanted to go out to dinner they charge $30 per hr for the driver to wait for us, P/U & drop off at the ship but that could be split with several couples