You have the exact right idea! As long as you keep all of the inheritance, including all assets, stocks, money, etc. inherited in separate accounts, not co-mingled with your marital assets, and keep them in your name, those assets will remain separate property, not marital property. They will not be subject to division upon divorce in the State of New York.
If you do decide to divorce, I strongly suggest you mediate such a divorce; if you are in the New York City metropolitan area, please call me at 212-370-1660 to discuss the matter in more detail.
Leonard M. Weiner, Esq./Divorce Solutions