The short answer:
Yes
The long answer:
What block and what item? If you want a modded block to only be harvestable by a vanilla item, you will use different methods than if you want a vanilla block to only be harvestable by a modded item. If you want a modded block to be harvested by a modded item, things should be pretty easy.
In the case that you have a modded block to be harvested by a modded or non-modded item, I'm not totally sure, but I believe the preferred method is using a loot table. Maybe somebody else knows how to check for the item used to harvest a block in a block's loot table.
There's also methods like canHarvestBlock and onBlockDestroyed in items like ShearsItem.
Or harvestTool in Block.Properties, but I think that would require making a new ToolType if the item in question is not an axe or pickaxe.