From a basic UX perspective, yes. The logic checks out within the context that's been provided:
- I have two components.
- The two components are different.
- I should style them differently so a user knows they're different.
Though, without testing or validation there's no way of knowing if you've overcompensated or just barely met the mark.
From a graphic design perspective, there's not enough context to argue either way so, there's not going to be a finite yes or no beyond "you can do whatever you want."
I think, instead of asking "can I combine some elements in rounded containers and others in straight-edge containers?" ask:
- "Can I create a complimentary design system that balances and empowers the contrast of straight-edge and rounded corner containers together?"
or even better:
- "What emotions or general value am I projecting/adding by making these container edges different?"
It could go either way depending on how these styles contribute to the overall design system as a whole (which is far more important by the end).
Generally, it's difficult to balance contradicting styles so they're used sparingly, saved for larger banner/features/highlights, or for one-off artistic thought experiments. You can create a website using only fire truck red and blue lagoon... blue but it's going to be a challenge to create a complimentary, comprehensive, multifaceted design system that provides an intuitive, enjoyable experience. I would add more context by fleshing out the rest of the design system first. That should help reveal problem component styles, etc.
Hope this helps.