In a shallow 2-quart microwave-safe dish with a lid, stir together scallion whites, ginger, vinegar, oil, red-pepper flakes, and sugar. Season with salt. Marinate cod in dish 20 minutes, turning once.
Cover and microwave on high, 5 minutes. Let stand, covered, until fish is opaque throughout, 5 minutes. Top with scallion greens. Serve fish with rice if desired.