Yes, you can play AC4 offline. However, it is always recommended to play online since it gives you access to many randomized side quests like treasure hunts. These missions are great missions that will net you a lot of money.