I can`t seem to get this right click popup menu to work.
You can't use a RelativeSource Binding to access the TreeView.DataContext from the ContextMenu because it is not in the main UI visual tree. This is a very well documented problem and the solution is to pass the DataContext object through to the ContextMenu using the ContextMeny.PlacementTarget property and the Tag property on the object that has the Contextmenu applied to it.
Having already written and re-written about this many times, nowadays, I much prefer to request that you read my answers to the ContextMenu.PlacementTarget is not getting set, no idea why and Add context menu in datagrid, how to get the select Item value questions here on Stack Overflow for full explanations and code examples. If you need further help, just search the internet for 'WPF ContextMenu DataContext' or something similar and you should find dozens of tutorials on this exact topic.