The dollar rose on Friday and was on course for its strongest monthly gain in almost a year, buoyed by safe-haven demand as the Middle East war intensifies and hopes fade for de-escalation.