I hope it's not too late. I'll post anyway. It might be useful to others.
If your options' visibility is dependant on value of some column in respective item, I'd suggest you use JSOM with some tricks. I had used the same for one of my projects.
Firstly, assuming that you are deploying custom ECB menus via a module. If not, please do so. And associate these ECB options to a content type using RegistrationType as shown below, otherwise those options will keep showing everywhere.
<CustomAction Id="CustomActionID" RegistrationType="ContentType" RegistrationId="YOUR-CONTENTTYPE-ID"
Title="Custom ECB Menu" >
<UrlAction Url="YOUR URL"/>
Here's how you would add the scriptlinks in the same module.
<CustomAction Location="ScriptLink" ScriptSrc="YOUR_LAYOUTS_MAPPED_FOLDER_NAME/jquery.min.js" Sequence="301"></CustomAction>
<CustomAction Location="ScriptLink" ScriptSrc="YOUR_LAYOUTS_MAPPED_FOLDER_NAME/YOUR_JS_CODE_FILE.js" Sequence="302"></CustomAction>
Now, in YOUR_JS_CODE_FILE.js, you can add the code to get the list items and can check the desired column's value to decide whether to show or hide that option. It's no big task to get the items' column's value but you'll have to jump through hoops to hide/show the ECB options.