On Android, apps can't self rate like that, all they can do is take you to the store page and let you rate their app. The app can't know what rating you gave.
Does iOS let apps self rate like that? This seems inconceivable to me.
Bottom line: when an app keeps pestering you to rate it, say "Yes fine I'll rate you", they take you to the app store and there, you do nothing (or one-star them). The app should register that you rated them and stop pestering you with that dialog.