My unit is a HTC Nexus 9,my question is: is it good enough Security wise,I have Bitdefender Mobile Security and Malwarebytes premium. Do I need to purchase a new Tablet?
For a tablet Android 7.1.1 should be fine, though in the good news department you have a Nexus device, meaning custom ROMs for Android 8.x should be available on XDA Developers. Regardless of whether you stay on stock or go with a custom ROM, I would uninstall both Bitdefender and Malwarebytes. Antivirus and antimalware apps are virtually useless on Android and only tend to slow the system down.
The above link will answer your first two questions with some searching and reading on your part. As to whether it is worth it, only you can answer that. That said, I believe it's worth it.
My Nexus 6 is currently running Android 8.1 when the last available stock ROM is "only" Android 7.1.1. Not only do I have the current patches I also have all the enhancements of Android 8.1. The only drawback is that my Nexus 6 can no longer activate the Google Assistant with the screen off. To me that's an acceptable tradeoff for what is now a secondary device.