In PrimeReact for the tree component there is an option to set the selectable property for each node
TreeNode/selectable