In the US, "package" is used for most items that come in soft packaging (e.g., cellophane, soft plastic, paper). Pasta is also sold in a cardboard box so it is also appropriate to refer to a "box of spaghetti." However, if the pasta is wrapped in cellophane or soft plastic, then "package of spaghetti" is appropriate. Similarly, rice can be sold in a box, a plastic bag or a canvas sack. Thus, one could refer to a "package of rice," "box of rice," "bag of rice," or a "sack of rice."
"Package" can also refer to anything that one receives by mail that is not a letter, regardless of whether it comes in soft packaging or a cardboard box and regardless of size. For example, the postal systems handles a lot of "packages" around Christmas.
If an item is small, one would often refer to a "packet." Starbucks sells individually wrapped "packets of instant coffee." Yet it is appropriate to refer to a "pack" or "packet" of gum.
A "pack" can also refer to animate objects: a "pack of wolves," a "pack of dogs."
In short, the use of "pack," "package" and "packet" is highly variable. :)