Can we use SonarQube community edition in order to scan branch other than main or master, also can we do PR decoration with help of SonarQube community edition ?
Welcome to the community!
You could do branch analysis by passing an alternate value to
sonar.projectKey, say something like
[project key]-[branch name].
For PR decoration there is no workaround.