Functioning as a spellbook is a “nonmagical benefit”, so it does not require attunement.
The rules for attunement state:
Without becoming attuned to an item that requires attunement, a creature gains only its nonmagical benefits, unless its description states otherwise.
So any nonmagical benefits of the spell book can be used without attunement. Since a Wizard’s usual spell book is not actually a magic item, just a collection of spell texts, functioning as a spell book is a nonmagical benefit - it’s a benefit you can get from a nonmagical version of this item. So yes, you can use an Alchemical Compendium as a spell book without attuning.
Some magical spellbooks have features that obstruct their use to non-attuned persons.
For example, consider the Crystalline Chronicle, a crystal ball that can function as a spellbook:
While you are touching the crystal, you can retrieve and store information and spells within the crystal at the same rate as reading and writing. [...] It functions as a spellbook for you, with its spells and other writing psychically encoded within it.
In this case, using the Chronicle as a spellbook is a magical benefit, since mundane crystal spheres don't magically store spells or psychically encode anything.
Another example is the Duplicitous Manuscript. To non-attuned persons, the book appears to be nothing more than a smutty romance novel:
To you, this book is a magical spellbook. To anyone else, the book appears to be a volume of verbose romance fiction.
Obviously, if you are not attuned to this book, you will not be able to cast spells from it.