In DTP jargon, per-word rubies (A) are called グループルビ (group-ruby), and per-kanji rubies (B) are called モノルビ (mono-ruby). There's also an intermediate convention called 熟語ルビ (jukugo-ruby).

- Are there objective criteria to prefer one style over the other?
Basically, prefer mono-ruby (B) for ordinary compounds where there's one-to-one correspondence between a kanji and a reading (e.g., 土曜日 = ど/よう/び). Use group-ruby (A) for jukujikun (i.e., 大人, 明日) and those unconventional/creative rubies.
As an exception, I personally prefer group-ruby on this site because mono-ruby can severely hurt searchability. Typing 家【か】内【ない】
produces 家【か】内【ない】, but it splits the word and makes it impossible to search.
When three or more kana are assigned to one kanji (e.g., 胃袋 = い/ぶくろ, 侍魂 = さむらい/だましい, 桜木町 = さくら/ぎ/ちょう), we have to consider spacing and overhanging as well, and there are many small rules around them. Please read this "Note" by W3C if you are interested. Overhanging is not supported by the furigana extension of this site, MS Word, or the <ruby>
tag of modern browsers. It's supported by professional-use DTP software like Adobe InDesign.
- Is one of the two styles considered in some way "official"?
- Which of the two is actually more widely used?
They are both common and have their own use cases. I can say mono-ruby is generally preferred in very simple cases such as 家内, but there are various house rules depending on the publisher for tricky cases. The W3C's "Note" is based on JIS (Japan Industrial Standard) X 4051. The document by W3C should serve as a general consensus.