I'm looking to replace the bearings a of set of Fulcrum Red Power 29 hubs (RT-004 front and RP9-004 rear). I'm having a hard time sourcing them from Canada and I'd also rather order 2 each rather than the 4 each sold in the package. Is it advisable to buy off brand bearings or should I avoid that? If yes, do I just need to look for the same dimensions as the branded bearings?
With bike hubs you are generally safe buying a high-quality generic replacement as long as it's actually the same bearing type, same dimensions, same kind of shields, and with 100%-ish grease fill. Getting all those things can have some subtleties.
If you're getting something from outside the bike world, like a local bearing house, you want to ask for 100% grease fill or add it yourself, because otherwise you won't get it. That said I'm not sure that the 18307s for the front exist outside the bike world.
Within the options packaged and sold for bikes you'll probably find there's at least one applicable option each from Enduro, Phil, and others. You may also find you have a choice on the seal type. Your front ones, again being kind of weird and made-up, may not pronounce the seal type or anything else on the existing bearings. In that case you'll need to either choose how aggressive of sealing you think you want, or examine the old seals and figure out what they are (LLU, LLB, etc) if you want it to match exactly. That said if you're wearing out bearings on a mountain hub it often makes sense to just get the most aggressive sealing you can find.
Perhaps more to your real question, yes it's mostly fine, since in many cases the good quality aftermarket options are as good or better, and sometimes a lot better, and in practice there is often confluence between needing to replace the bearings in the first place and the original ones being junk.