The approach should work and you can manipulate the parameters in the state_dict so that they match the new architecture. Here is a small example:
modelA = models.resnet18()
modelB = models.resnet18()

# Change modelB
modelB.fc = nn.Linear(512, 10)

# Try to load the pretrained state_dict
state_dict = modelA.state_dict()
modelB.load_state_dict(state_dict) # error

# Manipulate state_dict to match parameter shape
state_dict['fc.weight'] = state_dict['fc.weight'][:10]
state_dict['fc.bias'] = state_dict['fc.bias'][:10]

# Load again
modelB.load_state_dict(state_dict) # works