As you got second degree piles may not require surgery.
In third and fourth degree piles surgery is required.
Change your food habit.
Take more veggies and diet containing more fibers.
Take plenty of water.
as this is main problem for giving bleeding.
Take mild laxative at night.
Avoid fried, chillies and junk food.
Apply local antibiotic
, antipruritus cream.
Ok and take care.