Cutting 4" hole on Rim Joist
Sure, you can drill a large hole in a rim joist, provided there isn’t a large post directly above the hole. 

Loads will be “transferred” around the opening, whether the rim joist is parallel or perpendicular to the joists.