Hi,
Yes, overall you can execute Get-AzRoleAssignment to check if it will be successful with that principal ID and after that you can proceed to using Remove-AzRoleAssignment.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.