Michael, I don't recall ever seeing anyone bring an instrument onboard, but that doesn't mean it hasn't happened or you couldn't do it. I'm sure you can bring a guitar if you want.
That being said, an Alaska cruise is a port-intensive, tour-intensive cruise. You're likely to be off the ship all day, and when you get back on, you'll be getting ready for dinner, having dinner, going to shows and other entertainment, etc. There may not be as much time to play the guitar as you think, or enough time that would make it worthwhile to take it with you.