Roof venting in finished attic space?
If you have moisture in your decking, you've got a leak. You've been advised correctly. Spray foam on the underside of your roof decking. The roof membrane and spray foam is the best way to seal your attic and increase energy efficiency. There is one more thing you should do. Bring one or more ducts (Depending on the size of the attic space.) of conditioned air into the attic space. You're not trying to heat/cool the space, just condition it. Helping to keep humidity at or below 60% humidity.