Off-meta is very much allowed (although you should generally ask your team if they're okay with it beforehand, and try to coordinate if the team might need to adapt to it), and as for builds - as long as the items you buy have any remote utility to you, you can buy just about any item in just about any order you like.
For example; you can buy Guinsoo's Rageblade on Vayne, because, although she doesn't have any AP scaling, she can still benefit from the Attack Speed, Attack Damage, and On-hit effects.
On the other hand, you cannot buy Rabadon's Deathcap on Riven, as she has no AP scalings, and the item wouldn't benefit her in any way, shape, or form.
Those are just rough examples, but hopefully they get the point across.