The Kantian criterion of ethical is whether one would wish such behavior to become generally practiced (there are delicate differences between "wish" and "will", which I leave out).
"There is ... only a single categorical imperative and it is this: Act only on that maxim through which you can at the same time will that it should become a universal law."
So disobeying a law, in and of itself, is not immoral, it could even be immoral not to do so, if it is particularly unjust (probably not in this case). But also conversely, if the law is ethically sound the fact that it is not legally binding in one's country does not make breaking it ethical.
On whether copyright violations becoming a general practice is a good thing opinions differ, some argue that abolishing, or at least scaling back, copyright would on balance be beneficial. Your circumstances might be particularly favorable to such arguments: if we restrict the practice to individuals who have no alternative access to the books through no fault of their own the case for making it universal becomes stronger ("universal" does not exclude qualifiers, as long as they can be generally applied).
Since Kant wrote an essay titled Of the Injustice of Counterfeiting Books (1785) he may not concur. However, Kant did reject the notion of intellectual property, his defense of copyright is based on different considerations, see Pievatolo's Freedom, ownership and copyright: why does Kant reject the concept of intellectual property?:
"As most scholars, in the field of humanities, take intellectual property for granted, the representation of Kant like an intellectual property forerunner is still a dangerously mistaken commonplace. According to Kant's Architectonic of Pure Reason the philosopher is closer to a lawgiver than to an artificer, if philosophy is considered in its Weltbegriff or cosmopolitan concept (AA.03: 542.23-30). Because such a lawgiving is based upon that reason with which every human being is endowed, the laws of reason should be thought as public laws and not as individual, private creations.
How could a public law be consistently viewed as an object of private intellectual property? Kant avoids such a contradiction because his justification of authors' right does not rely on intellectual property, but on the meaning and the function of both authors and publishers in the world of the public use of reason. Therefore, Kant's theory of copyright is compatible with the Weltbegriff of philosophy."
Kant did not address poverty, etc., specifically, but given his justification of copyright in terms of public use of reason one can imagine a Kantian defense of the practice when it is a precondition for including individuals into this use. One could perhaps even invoke Kant's "formula of humanity", a second formulation of the categorical imperative:
"Act in such a way that you treat humanity, whether in your own person or in the person of any other, never merely as a means to an end, but always at the same time as an end."
See also Barron's Kant, Copyright and Communicative Freedom on Kantian subordination of authors' rights to the "public sphere":
"For Kant, progress towards a fully emancipated (i.e. a ‘mature’ or enlightened’) culture can only be achieved through the critical intellectual activity that public communication demands: individual expressive freedom is only a condition, not constitutive, of this ‘freedom o make public use of one’s reason in all matters’. The main thesis defended in his article is that when Kant's writings on publicity (critical public debate) are read in relation to his writings on the legal organization of publishing, a necessary connection emerges between authors' rights – as distinct from copyrights – and what Jürgen Habermas and others have named the "public sphere"."