Since Yarn 1.0 it’s easy because it has built in support for this scenario.
First solve the conflict in package.json
manually, then just run this:
$ yarn install
yarn install v1.0.1
info Merge conflict detected in yarn.lock and successfully merged.
[1/4] Resolving packages...
And then the conflict will be resolved and you can commit that or continue rebasing if that was what you were doing.