Representation of integers by principal binary quadratic forms
There are precisely two such proper divisors of $k$, and their product equals $-k$. This result is essentially due to Gauss, see Theorem 1 in Pall: Discriminantal divisors of binary quadratic forms, J. Number Theory 1 (1969), 525-533. Determining this pair of divisors is the subject of the quoted article in very special cases, so I don't think it is an easy task.
As noted in an earlier answer referring to Pall's 1969 paper in the Journal of Number Theory, it is unlikely that there is a simple way to describe all the divisors of $k$ that are represented by the form $x^2-ky^2$, for $k$ a positive nonsquare integer. There are algorithms to compute these divisors for any particular value of $k$, but a general criterion is lacking.
If we interpret ''divisor of $k$'' in the broadest sense possible, with negative numbers allowed as well as $1$ and $k$ themselves, then there are either two or four divisors of $k$ that are represented. These occur in pairs with the two numbers in each pair having opposite sign and product equal to $-k$. One pair is of course $(1,-k)$. Here are a few examples of the pairs that arise for small composite values of $k$:
$k=6: (1,-6),(3,-2)$
$k=10: (1,-10),(-1,10)$
$k=14: (1,-14),(2,-7)$
$k=15: (1,-15)$
$k=21: (1,-21),(7,-3)$
$k=22: (1,-22),(11,-2)$
$k=26: (1,-26),(26,-1)$
$k=30: (1,-30),(6,-5)$
$k=35: (1,-35)$
The paper by Pall says there are two pairs for each $k$, but Pall is considering divisors of the discriminant $4k$, not just divisors of $k$. Thus in the case $k=15$ with discriminant $60$ the pair $(10,-6)$ would also be included by Pall since $10$ is represented by $x^2-15y^2$ when $(x,y)=(5,1)$ and $-6$ is represented when $(x,y)=(3,1)$. In these extra cases allowed by Pall the product of the two numbers in a pair is $-4k$ rather than $-k$.
In addition to allowing divisors of the discriminant $4k$ instead of just divisors of $k$, Pall also restricts attention entirely to divisors that occur as first coefficients of forms $ax^2+cy^2$ or $ax^2+axy+cy^2$ equivalent to the given form $x^2-ky^2$. This makes no difference when $k$ is squarefree, but in other cases it does sometimes make a difference. For example the form $x^2-45y^2$ represents the pairs $(1,-45)$ and $(9,-5)$ but it also represents the divisor $-20$ of the discriminant $180$, with $-20$ not appearing as the leading coefficient of any form $ax^2+cy^2$ or $ax^2+axy+cy^2$ of discriminant $180$.
It is quite enlightening to look at this question from the viewpoint of Conway's topographs. In these terms what Pall is considering are mirror symmetries of the topograph. Each mirror symmetry is a reflection of the topograph across a line that passes through two regions of the topograph corresponding to two divisors of the discriminant that are represented by the given form. For positive nonsquare discriminants the topograph is periodic, and if the topograph has any mirror symmetries (the principal form $x^2-ky^2$ always has mirror symmetries) then there are exactly two lines of mirror symmetry in each period, for a total of four divisors represented.