Raise an error for has_one associations which try to go :through a polymorphic association

This PR addresses the missing exception dedicated to `has_one` associations which try to go :through a polymorphic association.

Issue raised by @georgemillo in #17263.