Can focal nodular hyperplasia (benign liver tumor) cause pain in the right side under the rib?

Yes. If it is large enough and located in a site that would ordinary produce the pain. It can stretch the liver capsule which is quite sensitive. Gallstone disease is a more common cause of pain here and you'll probably want this ruled out; it tends to be colicky and less related to position.