Just to clarify, you need a different rim for any different chain pitch. For example, a 3/8 rim for 3/8 chain and a .325 rim for .325 chain. The rims need to match the bar and chain size and pitch. But that is the same with a spur sprocket. The number of teeth in a spur sprocket also correlate with the number of slots in a rim drive. With a rim drive, you can swap to other pitch bar and chains though, w/o having to replace the entire brake drum and spur drive. For example, if you have a 390 and a 3/8 bar and chain, as well as a .325 bar and chain, you can swap between bars and chains, and only change out the rim.
To clarify on your other question, you can keep the same rim drive (or spur, for that matter) with different bar and chain lengths. A 3/8 rim drive will drive all lengths of 3/8 chains. It is just that when you are driving a longer bar, you may want to change the number of drivers in the spur to either increase the torque and lower the chain speed so that it does not bog down in the wood. You may also want to decrease the torque and increase the chain speed for different cutting applications. Different fallers have different opinions, and favorite setups. Typically Stihl has 3 sprocket teeth options on their mid-size and pro saws. They are listed in the parts lists of the saws.