If you’re looking for valid usage about using attachments as textures, that’s simple:
Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.
“this command” being rendering commands.
Using an image subresource as a sampled image is not using it as an attachment. Using an image subresource as a storage image is not using it as an attachment. These are forbidden.
Using an image subresource as an input attachment is using it as an attachment (even if it’s part of a descriptor too). That’s what “in shaders” means in the text you quoted.