It really depends on locations so if you are traveling make a point to check. Your local club should be able to give you all the info for your area and abroad if they organize group dives in other countries, otherwise just contact the destination dive club (and keep in mind that in some places the situation might change from one year to the other).
As a general rule most countries tend to have a maximum length for a blade above which you could face charges if carrying it on the person in any circumstance, or in the car.
If your gear is packed up in your car and the knife is in there with the kit generally it is not a problem since very often, carrying a blade longer than what is allowed can pass if there is a valid (and legal) reason for it. For example in Canada or parts of Europe a cop stopping me won't give much trouble if he sees the axe, camp knife etc all packed up with camping gear and a canoe/kayak on the roof of the car, or if the dive knife is in the trunk with all my diving equipment. I can see somebody having a problem if it's just a pool session, debatable if you are up to it.
It always helps, if stopped, to tell right away things like "I'm a diver, all my diving gear is in the trunk". It goes a long way in reducing the chances of the person stopping you, or if you are passing a border with the car, becoming picky and giving trouble (this goes even if you are on foot and the knife is in the bag with all the gear). The fact that the knife is in a bag way out of your reach helps too; don't keep it in your glovebox or under the seat.
It also helps if the knife is one of those with the blunted tip and not the ones looking like they just came off a gladiator of ancient Rome. A line cutter/emergency tool is even more discreet as it's so different looking and less menacing than a knife that it is often not even given a second look.
Cruises or airplanes can make the situation a PITA; personally I find that in that case getting one at the destination is easier.