Let's say I bought a domain name, which simply forwards to the affiliate site which is selling a product with my affiliate link. I was wondering, If I started building links to that domain name, is it theoretically possible to appear on google search with a domain name which just redirects to another page?
Not really. Since Google has nothing to index. And Google's smart, it can sniff redirects. 301 htaccess redirects are the best way of passing link juice.. so you can rank your affiliate link, in the end. But this doesn't work for all affiliate programs and you might just end up sending link juice to the main page of the affiliate product.