Not yes, but HECK YES!
A property inspection is not required by a lender. However, it is imperative that a buyer purchase a property inspection so that they are made aware of any conditions related to the property that have not been disclosed in the Seller’s Disclosure. To clarify: A licensed property inspector will go onto the roof, into the basement, check wiring, check plumbing and more. In many cases the inspector is able to identify issues the seller was not even aware of.
A licensed property inspector’s inspection is the best money you can spend when preparing to purchase a home. Furthermore, even though you are under contract at the time of the inspection, you are still protected per your contract. Your agent can review the details of this protection for your particular scenario.