Which IP do you want to use and how do you want to use it?
You can certainly use the IP of the visitor makingtheconnectionattempt. Neither your origin server IP or Cloudflare IPs should be useful on a WAF rule.
Oddly enough, and contrary to Cloudflare WAF’s standard behavior, the rule will save without an error message, leading users who scan the documentation without noticing that limitation to think they can use it.
However, the same field cf.edge.server_port is available in Redirect Rules for all plans. So what I would do is to redirect all requests not on {80 443} to the equivalent URL in 443.
When incoming requests match... (open the Expression Editor)
not (cf.edge.server_port in {80 443})
Then
Redirect URL
Type: Dynamic
Expression: concat("https://example.com", http.request.uri.path)
Status: 303
Alternatively, if you think you should instead block all such requests — keeping in mind some good bots might use ports other than 80 or 443 —, you can redirect them to a specific URL: