I take this to be an informal fallacy since we're not looking at a proper deductive argument but rather a conversational argument. As such, there's going to be room for disagreement as to whether any specific case of this is fallacious. (see Sample/ Guide: What is the name of fallacy: A implies B. Therefore C?)
I'd call this an appeal to conscience or potential an appeal to commonsense depending on the context. (see for instance https://books.google.co.jp/books?id=RtUrOUGI50YC&pg=PA78&lpg=PA78&dq=appeal+to+conscience+fallacy&source=bl&ots=a45VKzRlA4&sig=tMwnI5G5qTGYyhgAlxTGGMc9ltM&hl=en&sa=X&ved=0ahUKEwizoZeU4KfNAhVB2qYKHddQAUkQ6AEIHjAA#v=onepage&q=appeal%20to%20conscience%20fallacy&f=false ).
There's probably more references in the literature to "common sense" appeals and perhaps we can put all of these under appeal to emotion but at least for my reading, the best term would be an appeal to conscience.
A: is X wrong?
B: you already know that X is wrong because that's why you're asking this
I take it that what's happening is B is suggesting that A has an internal sense that it's wrong that is inspiring the question. This is simultaneously an appeal to conscience because just because A feels trepidation, guilt, or doubts about X does not actually by itself make X wrong (except on certain naive sentimentalist views).
So for instance, if you subscribe to a positive law view, then the supposition that people know things are wrong by conscience is going to be fallacious. (Think Nuremberg trials). Whereas if you subscribe to a natural law view, then many appeals to conscience can be correct. If you're Kant, then at least on my reading, you're committed to believing people's consciences never err (see MPV). If you're Hegel, you're committed to believing people's consciences are irrelevant to moral content.