It depends on the blockchain, it is possible in some cases. The 'standard' blockchain, even permissioned, does not allow that as every node has a full copy of the ledger; however, the blockchain space is very large.What you are looking for is Quorum, JP Morgans Blockchain. Quorum is a permissioned version of Ethereum that supports data privacy, specifically, it allows for transactions to remain private between the two sets of node groups(or parties) involved.
Make your career in Blockchain by enrolling in Blockchain Training to get the required skills.