The official policy for almost all cruise lines is that you cannot bring your own alcohol on board. On many cruise lines they will x-ray your baggage and confiscate liquor and hold it for the duration of the voyage. They will not open your bag and take it but will call you to an area for you to open the bag and give it to them. Does this mean that no one brings alcohol on board? No, many people do but many people also have it confiscated.
Usually a small pocket knife, with a blade less than 2" will be fine when going ashore. Anything larger could be thought of as a weapon. I have taken a leatherman on shore on many occasions with no problem but I am risking it being confiscated each time I take it off the ship. I do not take it for safety but for function. A knife can be used against you almost as easily as it can be used to defend yourself unless you are well trained.
Take care,
Mike